All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Philippe Rétornaz" <philippe.retornaz@epfl.ch>
Cc: alsa-devel@alsa-project.org, torbenh@linutronix.de,
	sameo@linux.intel.com, s.hauer@pengutronix.de,
	festevam@gmail.com, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/4] ASoC: Add mc13783 codec
Date: Tue, 15 May 2012 19:27:41 +0100	[thread overview]
Message-ID: <20120515182737.GF19592@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1337082832-9764-3-git-send-email-philippe.retornaz@epfl.ch>


[-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --]

On Tue, May 15, 2012 at 01:53:50PM +0200, Philippe Rétornaz wrote:
> 
> Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch>

This looks broadly good from a framework point of view but it's a bit
depressing that there are so many magic numbers even for register names
- it makes the code rather impenetrable and I wouldn't like to be
maintaining it.  I'll go ahead and apply it if Samuel is OK with patch 1
going via ASoC (there's a build dependency).

A few smallish things, please fix incrementally (or roll into a new
version if you're resubmitting for some reason):

> +	snd_soc_add_codec_controls(codec, mc13783_control_list,
> +					ARRAY_SIZE(mc13783_control_list));
> +
> +	snd_soc_dapm_new_controls(dapm, mc13783_dapm_widgets,
> +					ARRAY_SIZE(mc13783_dapm_widgets));
> +	snd_soc_dapm_add_routes(dapm, mc13783_routes,
> +					ARRAY_SIZE(mc13783_routes));

These should all be assigned in the CODEC driver structure.

> +static __init int mc13783_init(void)
> +{
> +	return platform_driver_register(&mc13783_codec_driver);
> +}
> +
> +static __exit void mc13783_exit(void)
> +{
> +	platform_driver_unregister(&mc13783_codec_driver);
> +}
> +
> +module_init(mc13783_init);
> +module_exit(mc13783_exit);

module_platform_driver().

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



WARNING: multiple messages have this Message-ID (diff)
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] ASoC: Add mc13783 codec
Date: Tue, 15 May 2012 19:27:41 +0100	[thread overview]
Message-ID: <20120515182737.GF19592@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1337082832-9764-3-git-send-email-philippe.retornaz@epfl.ch>

On Tue, May 15, 2012 at 01:53:50PM +0200, Philippe R?tornaz wrote:
> 
> Signed-off-by: Philippe R?tornaz <philippe.retornaz@epfl.ch>

This looks broadly good from a framework point of view but it's a bit
depressing that there are so many magic numbers even for register names
- it makes the code rather impenetrable and I wouldn't like to be
maintaining it.  I'll go ahead and apply it if Samuel is OK with patch 1
going via ASoC (there's a build dependency).

A few smallish things, please fix incrementally (or roll into a new
version if you're resubmitting for some reason):

> +	snd_soc_add_codec_controls(codec, mc13783_control_list,
> +					ARRAY_SIZE(mc13783_control_list));
> +
> +	snd_soc_dapm_new_controls(dapm, mc13783_dapm_widgets,
> +					ARRAY_SIZE(mc13783_dapm_widgets));
> +	snd_soc_dapm_add_routes(dapm, mc13783_routes,
> +					ARRAY_SIZE(mc13783_routes));

These should all be assigned in the CODEC driver structure.

> +static __init int mc13783_init(void)
> +{
> +	return platform_driver_register(&mc13783_codec_driver);
> +}
> +
> +static __exit void mc13783_exit(void)
> +{
> +	platform_driver_unregister(&mc13783_codec_driver);
> +}
> +
> +module_init(mc13783_init);
> +module_exit(mc13783_exit);

module_platform_driver().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120515/f884de98/attachment.sig>

  parent reply	other threads:[~2012-05-15 18:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-15 11:53 [PATCH 0/4] MC13783 sound support Philippe Rétornaz
2012-05-15 11:53 ` Philippe Rétornaz
2012-05-15 11:53 ` [PATCH 1/4] mc13xxx: add codec platform data Philippe Rétornaz
2012-05-15 11:53   ` Philippe Rétornaz
2012-05-15 11:53   ` [PATCH 2/4] ASoC: Add mc13783 codec Philippe Rétornaz
2012-05-15 11:53     ` Philippe Rétornaz
2012-05-15 11:53     ` [PATCH 3/4] ASoC: add imx-mc13783 sound support Philippe Rétornaz
2012-05-15 11:53       ` Philippe Rétornaz
2012-05-15 11:53       ` [PATCH 4/4] mx31moboard: Add " Philippe Rétornaz
2012-05-15 11:53         ` Philippe Rétornaz
2012-05-15 18:30       ` [PATCH 3/4] ASoC: add imx-mc13783 " Mark Brown
2012-05-15 18:30         ` Mark Brown
2012-05-16 10:48         ` [PATCH] ASoC: imx-mc13783 cleanup Philippe Rétornaz
2012-05-16 10:48           ` Philippe Rétornaz
2012-05-18 15:45           ` Mark Brown
2012-05-18 15:45             ` Mark Brown
2012-05-15 18:27     ` Mark Brown [this message]
2012-05-15 18:27       ` [PATCH 2/4] ASoC: Add mc13783 codec Mark Brown
2012-05-16 10:49       ` [PATCH] ASoC: mc13783 codec cleanups Philippe Rétornaz
2012-05-16 10:49         ` Philippe Rétornaz
2012-05-18  9:58   ` [PATCH 1/4] mc13xxx: add codec platform data Samuel Ortiz
2012-05-18  9:58     ` Samuel Ortiz
2012-05-18 15:41 ` [PATCH 0/4] MC13783 sound support Mark Brown
2012-05-18 15:41   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120515182737.GF19592@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=festevam@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=philippe.retornaz@epfl.ch \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=torbenh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.