diff mbox series

[v2,1/3] dt-bindings: thermal-zones: Document critical-action

Message ID 20230828141341.1583591-1-festevam@gmail.com
State Superseded
Headers show
Series [v2,1/3] dt-bindings: thermal-zones: Document critical-action | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Fabio Estevam Aug. 28, 2023, 2:13 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

Document the critical-action property to describe the thermal
action that will be taken after the critical temperature is reached.

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

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Changes since v1:
- Make 'critical-action' to be of string type.

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

Comments

Krzysztof Kozlowski Aug. 28, 2023, 6:54 p.m. UTC | #1
On 28/08/2023 16:13, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Document the critical-action property to describe the thermal
> action that will be taken after the critical temperature is reached.
> 
> The possible values are "shutdown" and "reboot".
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Changes since v1:
> - Make 'critical-action' to be of string type.
> 
>  .../devicetree/bindings/thermal/thermal-zones.yaml     | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> index 4f3acdc4dec0..a01456356d9f 100644
> --- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> +++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
> @@ -75,6 +75,16 @@ patternProperties:
>            framework and assumes that the thermal sensors in this zone
>            support interrupts.
>  
> +      critical-action:
> +        $ref: /schemas/types.yaml#/definitions/string
> +        description:
> +          The action that happens after the critical temperature is reached.

How some action can happen? Don't you mean that OS should perform this
action on critical temperature?

> +          Possible values are "shutdown" and "reboot".

Don't repeat constraints in free form text.

> +
> +        enum:
> +          - shutdown    # Trigger a shutdown after the critical temperature is reached
> +          - reboot      # Trigger a reboot after the critical temperature is reached

The comments are copying the description and enum value. Not really helpful.


Best regards,
Krzysztof
diff mbox series

Patch

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