From: Mark Brown <broonie@kernel.org>
To: Dan Murphy <dmurphy@ti.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family
Date: Tue, 18 Feb 2020 19:23:21 +0000 [thread overview]
Message-ID: <20200218192321.GN4232@sirena.org.uk> (raw)
In-Reply-To: <20200218172140.23740-3-dmurphy@ti.com>
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Tue, Feb 18, 2020 at 11:21:40AM -0600, Dan Murphy wrote:
A couple of very small things, otherwise this looks good:
> + if (unlikely(!tx_mask)) {
> + dev_err(component->dev, "tx and rx masks need to be non 0\n");
> + return -EINVAL;
> + }
Do you really need the unlikely() annotation here? This is *hopefully*
not a hot path.
> +static int adcx140_codec_probe(struct snd_soc_component *component)
> +{
> + struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component);
> + int sleep_cfg_val = ADCX140_WAKE_DEV;
> + u8 bias_source;
> + u8 vref_source;
> + int ret;
> +
> + adcx140->supply_areg = devm_regulator_get_optional(adcx140->dev,
> + "areg");
> + if (IS_ERR(adcx140->supply_areg)) {
You should really do the request and defer at the I2C level, that avoids
running through the whole card initialization repeatedly when the device
isn't ready. Basically try to do all resource aquisition at the device
level and then use it at the card level.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-02-18 19:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 17:21 [PATCH v2 0/2] INtroduce the TLV320ADCx140 codec family Dan Murphy
2020-02-18 17:21 ` [PATCH v2 1/2] dt-bindings: sound: Add TLV320ADCx140 dt bindings Dan Murphy
2020-02-18 17:21 ` [PATCH v2 2/2] ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family Dan Murphy
2020-02-18 17:24 ` Dan Murphy
2020-02-18 19:23 ` Mark Brown [this message]
2020-02-18 19:32 ` Dan Murphy
2020-02-18 19:47 ` 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=20200218192321.GN4232@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=dmurphy@ti.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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
Powered by JetHome