devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 1/3] dt-bindings: thermal-zones: Document critical-action
@ 2023-08-30 15:19 Fabio Estevam
  2023-08-30 15:19 ` [PATCH v6 2/3] reboot: Introduce hw_protection_reboot() Fabio Estevam
  2023-08-30 15:19 ` [PATCH v6 3/3] thermal: thermal_core: Allow rebooting after critical temp Fabio Estevam
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2023-08-30 15:19 UTC (permalink / raw)
  To: rafael
  Cc: daniel.lezcano, amitk, rui.zhang, linux-pm,
	krzysztof.kozlowski+dt, robh+dt, conor+dt, devicetree,
	Fabio Estevam, Krzysztof Kozlowski

From: Fabio Estevam <festevam@denx.de>

Document the critical-action property to describe the thermal action
the OS should perform after the critical temperature is reached.

The possible values are "shutdown" and "reboot".

The motivation for introducing the critical-action property is that
different systems may need different thermal actions when the critical
temperature is reached.

For example, a desktop PC may want the OS to trigger a shutdown
when the critical temperature is reached.

However, in some embedded cases, such behavior does not suit well,
as the board may be unattended in the field and rebooting may be a
better approach.

The bootloader may also benefit from this new property as it can check
the SoC temperature and in case the temperature is above the critical
point, it can trigger a shutdown or reboot accordingly.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v5:
- None.

 .../devicetree/bindings/thermal/thermal-zones.yaml       | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
index 4f3acdc4dec0..c2e4d28f885b 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@@ -75,6 +75,15 @@ patternProperties:
           framework and assumes that the thermal sensors in this zone
           support interrupts.
 
+      critical-action:
+        $ref: /schemas/types.yaml#/definitions/string
+        description:
+          The action the OS should perform after the critical temperature is reached.
+
+        enum:
+          - shutdown
+          - reboot
+
       thermal-sensors:
         $ref: /schemas/types.yaml#/definitions/phandle-array
         maxItems: 1
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-08-31  9:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-30 15:19 [PATCH v6 1/3] dt-bindings: thermal-zones: Document critical-action Fabio Estevam
2023-08-30 15:19 ` [PATCH v6 2/3] reboot: Introduce hw_protection_reboot() Fabio Estevam
2023-08-30 15:19 ` [PATCH v6 3/3] thermal: thermal_core: Allow rebooting after critical temp Fabio Estevam
2023-08-30 16:56   ` Fabio Estevam
2023-08-30 23:59   ` kernel test robot
2023-08-31  9:35   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).