From: Nicolin Chen <Guangyu.Chen@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
brian.austin@cirrus.com, pawel.moll@arm.com,
ijc+devicetree@hellion.org.uk, linux-doc@vger.kernel.org,
lgirdwood@gmail.com, Paul.Handrigan@cirrus.com,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
rob@landley.net, galak@codeaurora.org, grant.likely@linaro.org,
alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: cs42888: Add codec driver support
Date: Mon, 24 Feb 2014 23:47:09 +0800 [thread overview]
Message-ID: <20140224154708.GA6132@MrMyself> (raw)
In-Reply-To: <20140224113011.GE25940@sirena.org.uk>
On Mon, Feb 24, 2014 at 08:30:11PM +0900, Mark Brown wrote:
> On Mon, Feb 24, 2014 at 02:55:29PM +0800, Nicolin Chen wrote:
> > This patch adds support for the Cirrus Logic CS42888 Audio CODEC that
> > has four 24-bit A/D and eight 24-bit D/A converters.
>
> Looks generally good, some fairly small nits below.
I'll revise all of them.
Thank you.
Nicolin
----
>
> > [ CS42888 supports both I2C and SPI control ports. As initial patch,
> > this patch only adds the support for I2C. ]
>
> > 5 files changed, 795 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/sound/cs42888.txt
> > create mode 100644 sound/soc/codecs/cs42888.c
> > create mode 100644 sound/soc/codecs/cs42888.h
>
> Given that we're starting to split out separate bus drivers for the I2C
> and SPI CODECs (look at the recent submissions from Lars-Peter) it'd be
> good to start this off with a separate bus driver for I2C even if the
> SPI one is still to be done - that way the Kconfig stuff for machine
> drivers is all in place and doesn't need updating.
>
> > + - clocks : phandle to the clock source for MCLK
> > +
> > + - clock-names : must contain "mclk".
>
> These should really be lists though there's only one documented element
> so it's purely a documentation update.
>
> > + /* Disable auto-mute */
> > + regmap_update_bits(cs42888->regmap, CS42888_TXCTL,
> > + CS42888_TXCTL_AMUTE | CS42888_TXCTL_DAC_SZC_MASK,
> > + CS42888_TXCTL_DAC_SZC_SR);
>
> Does this interfere with the manual mute controls or is it a separate
> thing? If it plays nicely with the manual controls it's probably better
> to leave it enabled since it improves performance in some benchmarks
> (that's why hardware tends to have the feature).
>
> > + /*
> > + * We haven't marked the chip revision as volatile due to
> > + * sharing a register with the right input volume; explicitly
> > + * bypass the cache to read it.
> > + */
> > + regcache_cache_bypass(cs42888->regmap, true);
>
> The other option here is to just not provide a default so that the first
> time it's read it goes to hardware. It doesn't make much difference
> either way though.
>
> > +static int cs42888_i2c_remove(struct i2c_client *i2c_client)
> > +{
> > + snd_soc_unregister_codec(&i2c_client->dev);
> > + return 0;
> > +}
>
> The driver ought to disable runtime PM, the clock and the regulators here.
>
> > + /*
> > + * In case the device was put to hard reset during sleep,
> > + * we need to wait 500ns here before any I2C communication
> > + */
> > + mdelay(5);
>
> Do we need 500ns or 5ms?
>
> > + regcache_sync(cs42888->regmap);
>
> Should really check the return value here.
>
> > + if (!IS_ERR(cs42888->clk))
> > + clk_disable_unprepare(cs42888->clk);
>
> Does the device work without MCLK?
next prev parent reply other threads:[~2014-02-24 15:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 6:55 [PATCH] ASoC: cs42888: Add codec driver support Nicolin Chen
[not found] ` <1393224929-7555-1-git-send-email-Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2014-02-24 11:30 ` Mark Brown
2014-02-24 15:47 ` Nicolin Chen [this message]
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:32 ` Austin, Brian
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: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
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=20140224154708.GA6132@MrMyself \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).