@@ -49,6 +49,13 @@ struct regulator;
4949#define DISABLE_IN_SUSPEND 1
5050#define ENABLE_IN_SUSPEND 2
5151
52+ /*
53+ * Default time window (in milliseconds) following a critical under-voltage
54+ * event during which less critical actions can be safely carried out by the
55+ * system.
56+ */
57+ #define REGULATOR_DEF_UV_LESS_CRITICAL_WINDOW_MS 10
58+
5259/* Regulator active discharge flags */
5360enum regulator_active_discharge {
5461 REGULATOR_ACTIVE_DISCHARGE_DEFAULT ,
@@ -127,6 +134,8 @@ struct notification_limit {
127134 * @ramp_disable: Disable ramp delay when initialising or when setting voltage.
128135 * @soft_start: Enable soft start so that voltage ramps slowly.
129136 * @pull_down: Enable pull down when regulator is disabled.
137+ * @system_critical: Set if the regulator is critical to system stability or
138+ * functionality.
130139 * @over_current_protection: Auto disable on over current event.
131140 *
132141 * @over_current_detection: Configure over current limits.
@@ -153,6 +162,13 @@ struct notification_limit {
153162 * regulator_active_discharge values are used for
154163 * initialisation.
155164 * @enable_time: Turn-on time of the rails (unit: microseconds)
165+ * @uv_less_critical_window_ms: Specifies the time window (in milliseconds)
166+ * following a critical under-voltage (UV) event
167+ * during which less critical actions can be
168+ * safely carried out by the system (for example
169+ * logging). After this time window more critical
170+ * actions should be done (for example prevent
171+ * HW damage).
156172 */
157173struct regulation_constraints {
158174
@@ -204,6 +220,7 @@ struct regulation_constraints {
204220 unsigned int settling_time_up ;
205221 unsigned int settling_time_down ;
206222 unsigned int enable_time ;
223+ unsigned int uv_less_critical_window_ms ;
207224
208225 unsigned int active_discharge ;
209226
@@ -214,6 +231,7 @@ struct regulation_constraints {
214231 unsigned ramp_disable :1 ; /* disable ramp delay */
215232 unsigned soft_start :1 ; /* ramp voltage slowly */
216233 unsigned pull_down :1 ; /* pull down resistor when regulator off */
234+ unsigned system_critical :1 ; /* critical to system stability */
217235 unsigned over_current_protection :1 ; /* auto disable on over current */
218236 unsigned over_current_detection :1 ; /* notify on over current */
219237 unsigned over_voltage_detection :1 ; /* notify on over voltage */
0 commit comments