Re: [PATCH] regulator: da9063: disable unused voltage monitors

From: Benjamin Bara
Date: Thu Jul 14 2022 - 15:15:38 EST


On 7/14/22 11:36, DLG Adam Thomson wrote:

Thanks for the quick feedback.

> What exactly is the problem you're attempting to resolve through this patch?

I have some use cases where certain modules (e.g. audio) are not required.
Therefore, I have removed a couple of "always-on" from my DT to let the kernel
decide if the regulators are needed.
Since unfortunately some of the later disabled LDOs are monitored, the state
becomes invalid.


> If you disable monitoring of a regulator, and no other regulators are being
> monitored at that point, then GP_FB2 will no longer be asserted and you
> have the same issue.

Thanks for the clarification, I wasn't aware of that.
It's clear to me now that this would become a general problem.


> What's more this patch impacts all users and there's no means to re-enable
> monitoring.

I am aware that the patch is not complete to handle the whole voltage
monitoring of the da9063.
So if wanted, I can extend the patch to store the vmon state when disabling
it and restore it during the re-enable process (can also take a look for the
handling while sleep/suspend).

best regards & thanks again,
bb

P.S.
I checked if there is some existing kind of framework for voltage
monitoring of regulators, but I couldn't find something so far.
I can imagine it might make sense to have a DT property for
"regulator-monitor-voltage-on/-off" to override the OTP settings via DT,
but I am not sure if this is something that is needed/wanted/required.