Re: [PATCH 2/7] regulator: core: Don't assume always_on when is_enabled returns err

From: Mark Brown
Date: Tue Nov 20 2018 - 11:00:17 EST


On Mon, Nov 19, 2018 at 04:26:49PM -0800, Douglas Anderson wrote:

> At boot sometimes regulators (like qcom-rpmh-regulator) will return
> -EINVAL if we don't know the enable state of the regulator. We
> shouldn't take this to mean that the regulator is an always-on
> regulator, but that was what was happening since "-EINVAL" is non-zero
> and a few places in the code were not properly checking for errors.

This still results in breakage - if the regulator fails to read when
we're initializing then we won't flag the regualtor as always_on, the
regulator would need to tell the framework when it becomes readable.

This hardware really is fragile :(

Attachment: signature.asc
Description: PGP signature