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]

 



On 24/08/2023 18:50, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@xxxxxxx>
> 
> Currently, after the SoC reaches the critical temperature, the board
> goes through a poweroff mechanism.
> 
> In some 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 check the temperature and only allow the boot to
> proceed when the temperature is below a certain threshold.
> 
> Introduce the 'nxp,reboot-on-critical' property to indicate that the
> board will go through a reboot after the critical temperature is reached.
> 
> When this property is absent, the default behavior of forcing a shutdown
> is kept.
> 
> Signed-off-by: Fabio Estevam <festevam@xxxxxxx>
> ---
> Changes since v4:
> - None. Went back to using device tree property.
> 
>  .../devicetree/bindings/thermal/imx8mm-thermal.yaml         | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml b/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> index d2c1e4573c32..9ac70360fd35 100644
> --- a/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> +++ b/Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
> @@ -32,6 +32,12 @@ properties:
>    clocks:
>      maxItems: 1
>  
> +  nxp,reboot-on-critical:
> +    description: Property to indicate that the system will go through a reboot
> +      after the critical temperature is reached. If absent, the system will
> +      go through shutdown after the critical temperature is reached.
> +    type: boolean

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).

Best regards,
Krzysztof




[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