[alsa-devel] [PATCH v2 1/3] ASoC: max98090: read micbias from device property

Mark Brown broonie at kernel.org
Fri May 29 11:58:58 CEST 2015


On Thu, May 28, 2015 at 11:00:46AM -0700, yang.a.fang at intel.com wrote:

>  - maxim,dmic-freq: Frequency at which to clock DMIC
>  
> +- maxim,micbias: Micbias voltage applies to the analog mic

This needs to be more specific about what the value is - it looks like
it's the value to be written into a particular register?

> +	err = device_property_read_u32(codec->dev, "maxim,micbias", &micbias);
> +	if (err || micbias < M98090_MBVSEL_2V2  || micbias > M98090_MBVSEL_2V8)
> +		micbias = M98090_MBVSEL_2V8;

We should be logging an error if we read and out of range value here -
it's expected that the value might be missing but if we manage to read
something and it's invalid we should say so rather than silently ignore
it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150529/e70529ac/attachment.sig>


More information about the Alsa-devel mailing list