diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2023-10-26 17:48:24 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-11-13 04:26:28 +0300 |
commit | 1e22152aa59d793743fc53051dd7a042f362aecb (patch) | |
tree | 44090a81b836b7c09c3c193cd71d70aa3f0f6271 /include/linux | |
parent | 759e2bd96971763db1cfaf6cafc07654b12aa21e (diff) | |
download | linux-1e22152aa59d793743fc53051dd7a042f362aecb.tar.xz |
regulator: Implement uv_survival_time for handling under-voltage events
Add 'uv_survival_time' field to regulation_constraints for specifying
survival time post critical under-voltage event. Update the regulator
notifier call chain and Device Tree property parsing to use this new
field, allowing a configurable timeout before emergency shutdown.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.kernel.org/r/20231026144824.4065145-6-o.rempel@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/regulator/machine.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index e0ddfb5593c9..0cd76d264727 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h @@ -162,6 +162,13 @@ struct notification_limit { * regulator_active_discharge values are used for * initialisation. * @enable_time: Turn-on time of the rails (unit: microseconds) + * @uv_less_critical_window_ms: Specifies the time window (in milliseconds) + * following a critical under-voltage (UV) event + * during which less critical actions can be + * safely carried out by the system (for example + * logging). After this time window more critical + * actions should be done (for example prevent + * HW damage). */ struct regulation_constraints { @@ -213,6 +220,7 @@ struct regulation_constraints { unsigned int settling_time_up; unsigned int settling_time_down; unsigned int enable_time; + unsigned int uv_less_critical_window_ms; unsigned int active_discharge; |