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

Shawn Guo shawn.guo at linaro.org
Mon Dec 16 12:29:12 CET 2013

On Mon, Dec 16, 2013 at 03:31:29AM +0000, Li.Xiubo at freescale.com wrote:
> Well, the regulator_get_optional() is still needed to improve.
> For instance, if dts is not used for one platform and the external VDDD supply is
> absent. The regulator_get_optional() will return -EPROBE_DEFER, so the SGTL5000's
> probe, and then the SGTL5000 will do the deferral probe, and this time the same
> -EPROBE_DEFER error will return again. 

Yea, it seems in non-DT that regulator core can not figure out the
-ENODEV case like it does in DT, so it simply returns -EPROBE_DEFER no
matter whether the regulator is absent or it's present but just not
registered yet.  IOW, it can not distinguish between these two cases in
non-DT case.

Neither am I aware of any non-DT SGTL5000 users in the tree, nor I care.
I'm not concerned by this issue.

> Where should this special handling be dealt with ? Is here or regulator_get_optional()
> will be better ?

Anyway, this is another issue which should be addressed in regulator
core, IMO.


More information about the Alsa-devel mailing list