mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Mark Brown <broonie@kernel.org>
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 13:32:05 -0600	[thread overview]
Message-ID: <0faf0bfe-6186-59d0-e800-8523a33044dc@ti.com> (raw)
In-Reply-To: <20200218192321.GN4232@sirena.org.uk>

Mark

On 2/18/20 1:23 PM, Mark Brown wrote:
> 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.

I was copying the code from tlv320aic3x.c as suggested by one our audio 
guys here in TI.

I can remove it if you desire

>
>> +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.

Ack.  Makes more sense to do it in the I2C probe.

Dan


  reply	other threads:[~2020-02-18 19:39 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
2020-02-18 19:32     ` Dan Murphy [this message]
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=0faf0bfe-6186-59d0-e800-8523a33044dc@ti.com \
    --to=dmurphy@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --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

all inboxes | Powered by JetHome®