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

Shawn Guo shawn.guo at linaro.org
Tue Dec 17 08:16:15 EST 2013


On Tue, Dec 17, 2013 at 12:46:57PM +0000, Mark Brown wrote:
> On Tue, Dec 17, 2013 at 08:39:48PM +0800, Shawn Guo wrote:
> 
> > 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.
> 
> It tells the core that it now knows about all regulator mappings so it
> knows if it's not got a mapping none will ever appear.

Okay, it sounds like what we need.  But I searched all the occurrences
of have_full_constraints() in core.c, and haven't found how it
influences the regulator_map_list searching.  I'm looking at function
regulator_dev_lookup().  Can you point me the correct place of the code?

Shawn




More information about the linux-arm-kernel mailing list