From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
Simon <horms@verge.net.au>, Magnus <magnus.damm@gmail.com>,
Liam Girdwood <lrg@ti.com>,
Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [RFC][PATCH] ASoC: Add max98090 codec driver
Date: Tue, 20 Nov 2012 20:14:42 +0900 [thread overview]
Message-ID: <20121120111441.GJ10560@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <8739044mr0.wl%kuninori.morimoto.gx@renesas.com>
[-- Attachment #1.1: Type: text/plain, Size: 1059 bytes --]
On Tue, Nov 20, 2012 at 02:00:54AM -0800, Kuninori Morimoto wrote:
Overall this looks pretty good, a few issues below mostly to do with
updating to more current kernel APIs.
> +/* RESET / STATUS / INTERRUPT REGISTERS */
> +#define M98090_0x00_SW_RESET 0x00
The standard for Maxim drivers is to use MAX as the prefix rather than
M.
> +static const u8 max98090_reg[] = {
> + 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, /* 0x00 - 0x07 */
Use regmap for register I/O please.
> + snd_soc_write(codec, M98090_0x06_DAI_IF, val);
More idiomatic is snd_soc_update_bits() so we don't do the write if
there's no change (as is very common).
> + ret = snd_soc_read(codec, M98090_0xFF_REV_ID);
> + if (ret < 0) {
> + dev_err(dev, "Failed to read device revision: %d\n", ret);
> + return ret;
> + }
> + dev_info(dev, "revision 0x%02x\n", ret);
With regmap this should be moved to the I2C level probe.
> + snd_soc_add_codec_controls(codec, max98090_snd_controls,
> + ARRAY_SIZE(max98090_snd_controls));
Initialise these from the snd_soc_codec_driver.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-11-20 11:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 10:00 [RFC][PATCH] ASoC: Add max98090 codec driver Kuninori Morimoto
2012-11-20 11:14 ` Mark Brown [this message]
2012-11-21 4:27 ` [RFC][PATCH v2] " Kuninori Morimoto
2012-11-21 4:32 ` 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=20121120111441.GJ10560@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lrg@ti.com \
--cc=magnus.damm@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox