[PATCH v1] thermal: imx: Update critical temp threshold

Daniel Lezcano daniel.lezcano at linaro.org
Mon May 9 02:55:20 PDT 2022


Hi Francesco,


On 20/04/2022 11:13, Francesco Dolcini wrote:
> Increase the critical temperature threshold to the datasheet defined
> value according to the temperature grade of the SoC, increasing the
> actual critical temperature value of 5 degrees.
> 
> Without this change the emergency shutdown will trigger earlier then
> required affecting applications that are expected to be working on this
> close to the limit, but yet valid, temperature range.
> 
> Signed-off-by: Francesco Dolcini <francesco.dolcini at toradex.com>
> ---
> 
> Not sure if there is an alternative to this patch, the critical threshold seems
> to be read-only and it is not possible to just change it from user space that
> would be my preferred solution.
> 
> According to the original discussion [1] the reasoning was the following:
> 
> On Tue, Jul 28, 2015 at 4:50 PM, Tim Harvey <tharvey at gateworks.com> wrote:
>> Yes - the purpose of lowering the critical threshold from the hardware
>> default is to allow Linux to shutdown more cleanly.
> 
> But I do not understand it.

Shawn, Sascha ? any comment ?

> [1] https://lore.kernel.org/all/CAJ+vNU1PQZa9KoCU9o_ws6jAAjhGVJby-1P583SVejT5TrAFTQ@mail.gmail.com/
> 
> ---
>   drivers/thermal/imx_thermal.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
> index 16663373b682..75a631a23e61 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -504,10 +504,10 @@ static void imx_init_temp_grade(struct platform_device *pdev, u32 ocotp_mem0)
>   	}
>   
>   	/*
> -	 * Set the critical trip point at 5 °C under max
> +	 * Set the critical trip point at max
>   	 * Set the passive trip point at 10 °C under max (changeable via sysfs)
>   	 */
> -	data->temp_critical = data->temp_max - (1000 * 5);
> +	data->temp_critical = data->temp_max;
>   	data->temp_passive = data->temp_max - (1000 * 10);
>   }
>   


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog



More information about the linux-arm-kernel mailing list