Re: [PATCH RFC v4 07/13] regulator: find active protections during initialization
From: Matti Vaittinen
Date: Mon Jun 26 2023 - 09:56:48 EST
On 6/20/23 23:03, Benjamin Bara wrote:
From: Benjamin Bara <benjamin.bara@xxxxxxxxxxx>
It can happen that monitors are activated before the kernel is started,
e.g. by bootloader or by OTP. If monitoring workarounds are active on a
regulator, the core shouldn't perform the state changes without applying
the workaround to the regulator. Therefore, warn the user already during
initialization that the device-tree should be adapted.
Warning can be fixed by enabling (or disabling) monitoring in the DT,
e.g.:
regulator-uv-protection-microvolt = <1>;
or
regulator-ov-error-microvolt = <0>;
Constraints regarding the monitoring of a regulator can usually be found
in the docu.
I am not entirely sure if this is the right thing to do. Should we
expect the hardware state to be what is described in DT at Linux boot-up
- or, should we silently accept the fact that for example boot can alter
things.
From the 'code pov' I have no complaints though. I just can't say if
warning is the right idea. I'll leave this for bigger brains to decide :)
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~