[PATCH 2/2] ASoC: sgtl5000: clean up sgtl5000_enable_regulators()

Shawn Guo shawn.guo at linaro.org
Tue Dec 17 07:39:48 EST 2013


On Tue, Dec 17, 2013 at 11:37:05AM +0000, Mark Brown wrote:
> On Tue, Dec 17, 2013 at 10:16:13AM +0800, Shawn Guo wrote:
> > On Tue, Dec 17, 2013 at 01:59:39AM +0000, Mark Brown wrote:
> 
> > > It's something that the platform needs to address - the core has no way
> > > of figuring out what devices might register in future if the platform
> > > doesn't tell them.
> 
> > Okay.  But is there an established means for platform to tell that?
> 
> That's what has_full_constraints() is for.

Hmm, I do not quite follow.  The regulator core needs to know whether a
regulator device is present or absent, before the regulator is
registered, so that regulator core can decide to return -EDEFER_PROBE
or -ENODEV when consumer calls regulator_get_optional() to get the
regulator.  Are you saying platform can call
regulator_has_full_constraints() to help regulator core to make this
decision?  I do not understand how it works.

Shawn




More information about the linux-arm-kernel mailing list