All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Nicolin Chen <Guangyu.Chen@freescale.com>
Cc: broonie@kernel.org, brian.austin@cirrus.com,
	Paul.Handrigan@cirrus.com, mark.rutland@arm.com,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	pawel.moll@arm.com, ijc+devicetree@hellion.org.uk,
	linux-doc@vger.kernel.org, lgirdwood@gmail.com,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	rob@landley.net, galak@codeaurora.org, grant.likely@linaro.org
Subject: Re: [alsa-devel] [PATCH] ASoC: cs42888: Add codec driver support
Date: Mon, 24 Feb 2014 18:54:09 +0100	[thread overview]
Message-ID: <530B8741.3010302@metafoo.de> (raw)
In-Reply-To: <1393224929-7555-1-git-send-email-Guangyu.Chen@freescale.com>

Hi,

Couple of trivial things.

On 02/24/2014 07:55 AM, Nicolin Chen wrote:
[...]
> +config SND_SOC_CS42888
> +	tristate "Cirrus Logic CS42888 CODEC"
> +	depends on I2C

should select REGMAP_I2C

> +
[...]
> +#define CS42888_NUM_SUPPLIES 4
> +static const char *cs42888_supply_names[CS42888_NUM_SUPPLIES] = {

const char *const

> +	"VA",
> +	"VD",
> +	"VLS",
> +	"VLC",
> +};
> +
> +static const char *cs42888_adc_single[] = { "Differential", "Single-Ended" };

const char * const

> +static const char *cs42888_szc[] = { "Immediate Change", "Zero Cross",
> +				     "Soft Ramp", "Soft Ramp on Zero Cross" };
> +

const char * constr

> +static const struct soc_enum cs42888_enum[] = {
> +	SOC_ENUM_SINGLE(CS42888_ADCCTL, 4, 2, cs42888_adc_single),
> +	SOC_ENUM_SINGLE(CS42888_ADCCTL, 3, 2, cs42888_adc_single),
> +	SOC_ENUM_SINGLE(CS42888_TXCTL, 5, 4, cs42888_szc),
> +	SOC_ENUM_SINGLE(CS42888_TXCTL, 0, 4, cs42888_szc),
> +};

Usually it makes things a bit more clearer when you have a variable with a 
unique name for each enum rather then putting them into one large array.

> +
[...]
> +static struct cs42888_ratios cs42888_ratios[] = {

const

[...]
> +static struct snd_soc_dai_ops cs42888_dai_ops = {

const

> +	.set_fmt	= cs42888_set_dai_fmt,
> +	.set_sysclk	= cs42888_set_dai_sysclk,
> +	.hw_params	= cs42888_hw_params,
> +	.digital_mute	= cs42888_digital_mute,
> +};
> +
[...]
> +
> +static struct reg_default cs42888_reg[] = {

const
[...]
> +
> +static struct snd_soc_codec_driver cs42888_driver = {

const

> +	.probe = cs42888_probe,
> +	.idle_bias_off = true,
> +
> +	.controls = cs42888_snd_controls,
> +	.num_controls = ARRAY_SIZE(cs42888_snd_controls),
> +	.dapm_widgets = cs42888_dapm_widgets,
> +	.num_dapm_widgets = ARRAY_SIZE(cs42888_dapm_widgets),
> +	.dapm_routes = cs42888_dapm_routes,
> +	.num_dapm_routes = ARRAY_SIZE(cs42888_dapm_routes),
> +};
> +


WARNING: multiple messages have this Message-ID (diff)
From: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
To: Nicolin Chen <Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	brian.austin-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org,
	Paul.Handrigan-jGc1dHjMKG3QT0dZR+AlfA@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [alsa-devel] [PATCH] ASoC: cs42888: Add codec driver support
Date: Mon, 24 Feb 2014 18:54:09 +0100	[thread overview]
Message-ID: <530B8741.3010302@metafoo.de> (raw)
In-Reply-To: <1393224929-7555-1-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>

Hi,

Couple of trivial things.

On 02/24/2014 07:55 AM, Nicolin Chen wrote:
[...]
> +config SND_SOC_CS42888
> +	tristate "Cirrus Logic CS42888 CODEC"
> +	depends on I2C

should select REGMAP_I2C

> +
[...]
> +#define CS42888_NUM_SUPPLIES 4
> +static const char *cs42888_supply_names[CS42888_NUM_SUPPLIES] = {

const char *const

> +	"VA",
> +	"VD",
> +	"VLS",
> +	"VLC",
> +};
> +
> +static const char *cs42888_adc_single[] = { "Differential", "Single-Ended" };

const char * const

> +static const char *cs42888_szc[] = { "Immediate Change", "Zero Cross",
> +				     "Soft Ramp", "Soft Ramp on Zero Cross" };
> +

const char * constr

> +static const struct soc_enum cs42888_enum[] = {
> +	SOC_ENUM_SINGLE(CS42888_ADCCTL, 4, 2, cs42888_adc_single),
> +	SOC_ENUM_SINGLE(CS42888_ADCCTL, 3, 2, cs42888_adc_single),
> +	SOC_ENUM_SINGLE(CS42888_TXCTL, 5, 4, cs42888_szc),
> +	SOC_ENUM_SINGLE(CS42888_TXCTL, 0, 4, cs42888_szc),
> +};

Usually it makes things a bit more clearer when you have a variable with a 
unique name for each enum rather then putting them into one large array.

> +
[...]
> +static struct cs42888_ratios cs42888_ratios[] = {

const

[...]
> +static struct snd_soc_dai_ops cs42888_dai_ops = {

const

> +	.set_fmt	= cs42888_set_dai_fmt,
> +	.set_sysclk	= cs42888_set_dai_sysclk,
> +	.hw_params	= cs42888_hw_params,
> +	.digital_mute	= cs42888_digital_mute,
> +};
> +
[...]
> +
> +static struct reg_default cs42888_reg[] = {

const
[...]
> +
> +static struct snd_soc_codec_driver cs42888_driver = {

const

> +	.probe = cs42888_probe,
> +	.idle_bias_off = true,
> +
> +	.controls = cs42888_snd_controls,
> +	.num_controls = ARRAY_SIZE(cs42888_snd_controls),
> +	.dapm_widgets = cs42888_dapm_widgets,
> +	.num_dapm_widgets = ARRAY_SIZE(cs42888_dapm_widgets),
> +	.dapm_routes = cs42888_dapm_routes,
> +	.num_dapm_routes = ARRAY_SIZE(cs42888_dapm_routes),
> +};
> +

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-02-24 17:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24  6:55 [PATCH] ASoC: cs42888: Add codec driver support Nicolin Chen
2014-02-24  6:55 ` Nicolin Chen
2014-02-24 11:30 ` Mark Brown
2014-02-24 11:30   ` Mark Brown
2014-02-24 15:47   ` Nicolin Chen
2014-02-24 15:47     ` Nicolin Chen
2014-02-24 15:52   ` Austin, Brian
2014-02-24 15:47     ` Nicolin Chen
2014-02-24 16:06     ` Nicolin Chen
2014-02-24 16:06       ` Nicolin Chen
2014-02-24 16:32       ` Austin, Brian
2014-02-24 16:32         ` Austin, Brian
2014-02-25  2:32         ` Nicolin Chen
2014-02-25  2:32           ` Nicolin Chen
2014-02-25  0:00       ` Mark Brown
2014-02-25  2:38         ` Nicolin Chen
2014-02-25  3:09           ` Mark Brown
2014-02-25  3:13             ` Nicolin Chen
2014-02-25  3:39               ` Mark Brown
2014-02-25  3:46                 ` Nicolin Chen
2014-02-25  3:46                   ` Nicolin Chen
2014-02-25  3:52                   ` Mark Brown
2014-02-25  3:54                     ` Nicolin Chen
2014-02-25  3:54                   ` [alsa-devel] " Fabio Estevam
2014-02-25  3:55                     ` Nicolin Chen
2014-02-24 17:54 ` Lars-Peter Clausen [this message]
2014-02-24 17:54   ` Lars-Peter Clausen
2014-02-25  2:39   ` Nicolin Chen
2014-02-25  2:39     ` Nicolin Chen

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=530B8741.3010302@metafoo.de \
    --to=lars@metafoo.de \
    --cc=Guangyu.Chen@freescale.com \
    --cc=Paul.Handrigan@cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=brian.austin@cirrus.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    /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.