[PATCH v2 08/12] regulator: allow user configuration of hardware protection action
Tzung-Bi Shih
tzungbi at kernel.org
Mon Jan 20 07:12:24 UTC 2025
On Mon, Jan 13, 2025 at 05:25:33PM +0100, 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: Tzung-Bi Shih <tzungbi at kernel.org>
More information about the Linux-security-module-archive
mailing list