[alsa-devel] [PATCH v3 6/6] ASoC: tlv320aic32x4: Support for regulators

Markus Pargmann mpa at pengutronix.de
Mon Jan 27 17:10:54 CET 2014


On Mon, Jan 27, 2014 at 03:15:33PM +0000, Mark Brown wrote:
> On Mon, Jan 27, 2014 at 01:03:10PM +0100, Markus Pargmann wrote:
> > +	aic32x4->supply_ldo = devm_regulator_get_optional(dev, "ldoin");
> > +	aic32x4->supply_iov = devm_regulator_get_optional(dev, "iov");
> > +	aic32x4->supply_dv = devm_regulator_get_optional(dev, "dv");
> > +	aic32x4->supply_av = devm_regulator_get_optional(dev, "av");
> These shouldn't be optional, it seems unlikely that the device is going
> to work without power.  This will also be broken for probe deferral
> since the code will just ignore errors so if the error is -EPROBE_DEFER
> it'll not actually defer.

The manual describes the possible power supplies as the following:

dv has to be present if ldoin is not supplied or LDO_SELECT hardware pin
is low.
av has to be present if ldoin is not supplied.
iov is always necessary.
ldoin is necessary if both dv and av are not supplied.

I will try to catch all those conditions in the next version and fix the

> Just use the normal bulk functions, as Fabio said this will be simpler
> too, and there should be code to disable on device removal at least
> (ideally also on suspend and resume, and while the device is idle if it
> doesn't have slow startup times).

Do the normal bulk functions handle optional regulators?



Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

More information about the Alsa-devel mailing list