Re: [PATCH v5 1/2] dt-bindings: imx8mm-thermal: Document nxp,reboot-on-critical

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Krzysztof,

On Thu, Aug 24, 2023 at 2:51 PM Krzysztof Kozlowski
<krzysztof.kozlowski@xxxxxxxxxx> wrote:

> It still does not scale. If it is supposed to be DT property, you need
> to solve my concerns of relying on specific implementation.
>
> First, you need to cover all possible actions, not reverse existing OS
> implementation. As I said before, If Linux decides to reboot by default,
> this property becomes useless. No, it must be some sort of enum defining
> desired allowed action or actions.
>
> Second, I don't think this is specific to this particular device, so
> should be rather common property shared among all thermal handlers (and
> in the future any other critical-condition-handler-devices).

I got your point and it makes sense.

I tested locally with a common DT property like this:

index 4f3acdc4dec0..782cbb4ea487 100644
--- a/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
+++ b/Documentation/devicetree/bindings/thermal/thermal-zones.yaml
@@ -75,6 +75,14 @@ patternProperties:
           framework and assumes that the thermal sensors in this zone
           support interrupts.

+      critical-action:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description:
+          The action that happens after the critical temperature is reached.
+          Possible values are 0 for shutdown and 1 for reboot.
+
+        enum: [ 0, 1 ]
+
       thermal-sensors:
         $ref: /schemas/types.yaml#/definitions/phandle-array
         maxItems: 1

Then in the board dts I can use:

+
+       thermal-zones {
+               cpu-thermal {
+                       critical-action = <THERMAL_CRITICAL_ACTION_REBOOT>;
+               };
+       };
 };

I should probably be able to post something next week.

Thanks
Thanks




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux