Re: [PATCH RFC 1/2] regulator: core: Disable unused regulators with unknown status

From: Mark Brown
Date: Mon Oct 23 2023 - 08:09:22 EST


On Wed, Oct 04, 2023 at 04:17:17PM +0200, Stephan Gerhold wrote:

> Instead of -EINVAL we could also use a different return code to indicate
> the initial status is unknown. Or maybe there is some other option that
> would be easier? This is working for me but I'm sending it as RFC to get
> more feedback. :)

The more normal thing here would be -EBUSY I think - -EINVAL kind of
indicates that the operation will never work while in reality it could
possibly work in future. Though for the RPMH it's not really the case
that it ever supports readback, what it does is have it's own reference
counting in the driver. Rather than doing this we should probably have
logic in the core which sees that the driver has a write operation but
no read operation and implements appropriate behaviour.

Attachment: signature.asc
Description: PGP signature