Re: [alsa-devel] [PATCH] ASoC: AK4458: add regulator for ak4458

Mark Brown
2019-05-16T16:54:43Z

[-- Attachment #1: Type: text/plain, Size: 675 bytes --]

On Thu, May 16, 2019 at 10:14:42AM -0300, Fabio Estevam wrote:

> > + ret = devm_regulator_bulk_get(ak4458->dev, ARRAY_SIZE(ak4458->supplies),
> > + ak4458->supplies);
> > + if (ret != 0) {
> > + dev_err(ak4458->dev, "Failed to request supplies: %d\n", ret);
> > + return ret;

> This would break existing users that do not pass the regulators in device tree.

It won't, if you're using regulator_get() and there's just no regulator
in the DT the regulator framework just assumes that there is actually a
regulator there which isn't described in the DT and substitutes in a
dummy regulator for you.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]