[alsa-devel] How should SGTL5000 codec driver adapt to dummy regulator change?

Mark Brown broonie at kernel.org
Tue Dec 3 12:56:45 CET 2013


On Tue, Dec 03, 2013 at 02:53:21PM +0800, Shawn Guo wrote:

> The sgtl5000_enable_regulators() function in SGTL5000 codec driver makes
> the decision whether an external VDDD supply is available by checking
> the return of regulator_bulk_get() call.  It used to work because dummy
> regulator did not play in there, and if regulator_bulk_get() fails, most
> likely it's only because there is no external VDDD supply.  But with
> commit 4ddfebd (regulator: core: Provide a dummy regulator with full
> constraints) merged, the regulator_bulk_get() will always succeed.  It
> breaks the driver's assumption.  What's your suggestion to the problem?

It should be using regulator_get_optional() to look for the regulator,
the current code isn't good anyway in the way it is handling this since
it's trying to get this regulator that needs special handling as part of
the bulk request which makes everything more confused.  Li Xiubo was
working on trying to improve this this week - check the list archives
for mails from him.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131203/1c2b234b/attachment.sig>


More information about the Alsa-devel mailing list