[alsa-devel] [PATCH] ASoC: wm8731: initialize the hardware when loading the codec driver

Sergey Kiselev sergey.kiselev at intel.com
Fri Jun 5 20:20:26 CEST 2015


On Fri, 5 Jun 2015 17:25:46 +0100
Charles Keepax <ckeepax at opensource.wolfsonmicro.com> wrote:

> On Wed, Jun 03, 2015 at 01:19:26PM -0700, Sergey Kiselev wrote:
> > From: Sergey Kiselev <sergey.kiselev at intel.com>
> [] 
> >  	/* Regulators will have been enabled by bias management */
> 
> This comment needs an update because this function is only called
> from the bus probe so no bias management will have been called
> yet. Basically we are powering down here after probe is complete
> and the bias management will power us up again.

I think that's what the comment says (future perfect tense?!). I can
rephrase it with something simpler like "regulators will be enabled by
bias management". English is not my mother tongue, and I appreciate any
corrections. :-)

> 
> >  	regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
> > @@ -621,19 +631,7 @@ err_regulator_enable:
> 
> Looks like you really should just combine the error and normal
> exit paths for this function.
> 

Will do.

> >  	return ret;
> > +	regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
> > +
> 
> Do we actually need to bulk_disable here? The enable we did
> during bus probe is balanced with the disable we do there two.
> Then I would expect that ASoC has put us back into bias off
> before we are removing the i2c. Not a 100% sure on this one but
> it looks like it is redundant.
> 

I think you're correct. Actually the DAPM will turn the bias off when
machine driver is removed, which must happen before codec is removed.

> Thanks,
> Charles

-- 
Sergey


More information about the Alsa-devel mailing list