[PATCH v2 08/12] regulator: allow user configuration of hardware protection action

Matti Vaittinen mazziesaccount at gmail.com
Wed Jan 22 11:18:31 UTC 2025


On 13/01/2025 18:25, Ahmad Fatoum wrote:
> When the core detects permanent regulator hardware failure or imminent
> power failure of a critical supply, it will call hw_protection_shutdown
> in an attempt to do a limited orderly shutdown followed by powering off
> the system.
> 
> This doesn't work out well for many unattended embedded systems that don't
> have support for shutdown and that power on automatically when power is
> supplied:
> 
>    - A brief power cycle gets detected by the driver
>    - The kernel powers down the system and SoC goes into shutdown mode
>    - Power is restored
>    - The system remains oblivious to the restored power
>    - System needs to be manually power cycled for a duration long enough
>      to drain the capacitors
> 
> Allow users to fix this by calling the newly introduced
> hw_protection_trigger() instead: This way the hw_protection commandline
> or sysfs parameter is used to dictate the policy of dealing with the
> regulator fault.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

Reviewed-by: Matti Vaittinen <mazziesaccount at gmail.com>




More information about the Linux-security-module-archive mailing list