[PATCH] ASoC: cs42l51: improve error handling in cs42l51_remove()

Mark Brown broonie at kernel.org
Fri Oct 22 14:14:52 CEST 2021


On Fri, Oct 22, 2021 at 09:12:17AM +0200, Uwe Kleine-König wrote:
> On Thu, Oct 21, 2021 at 10:31:56PM +0100, Mark Brown wrote:

> > The warning is fine so long as there's no action on it but use regular
> > regulator_bulk_disable() since as you youself said force disable is not
> > appropriate here.

> It's just the documentation of regulator_bulk_force_disable() that
> irritates me. It's behaviour is exactly fine. If a user of several
> regulators goes away, it should try to disable all regulators and if one
> fails to disable it's better to the others instead of keeping all
> enabled.

Well, you definitely don't want force disable since it ignores
refcounting and might impact something else sharing the regulator.
You'd want to add a separate function that just ignored errors, though
bear in mind that a lot of datasheets recommend against having the
device partially powered, warning that it may damage the part.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20211022/3bc42ff1/attachment.sig>


More information about the Alsa-devel mailing list