Re: [PATCH 2/2] ASoC: codecs: nau8822: add support for supply regulators

From: Mark Brown

Date: Wed May 13 2026 - 21:43:46 EST


On Wed, May 13, 2026 at 05:39:11PM +0400, Alexey Charkov wrote:

> + for (i = 0; i < ARRAY_SIZE(regulators); i++) {
> + ret = devm_regulator_get_enable_optional(dev, regulators[i]);
> + if (ret && ret != -ENODEV)
> + return dev_err_probe(dev, ret,
> + "Failed to get regulator %s\n",
> + regulators[i]);
> + }

As ever unless the device can work with the supply being physically
absent regulators should never be optional.

Attachment: signature.asc
Description: PGP signature