[alsa-devel] How should SGTL5000 codec driver adapt to dummy regulator change?
Mark,
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?
Shawn
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.
participants (2)
-
Mark Brown
-
Shawn Guo