[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <adceca49-acbc-4ae6-984c-5a8916aba8be@linaro.org>
Date: Mon, 10 Nov 2025 14:07:26 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Laura Nao <laura.nao@...labora.com>, srini@...nel.org, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, rafael@...nel.org,
rui.zhang@...el.com, lukasz.luba@....com, matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com
Cc: nfraprado@...labora.com, arnd@...db.de, colin.i.king@...il.com,
u.kleine-koenig@...libre.com, andrew-ct.chen@...iatek.com,
lala.lin@...iatek.com, bchihi@...libre.com, frank-w@...lic-files.de,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, kernel@...labora.com,
Chen-Yu Tsai <wenst@...omium.org>, Fei Shao <fshao@...omium.org>
Subject: Re: [PATCH RESEND v3 5/9] thermal/drivers/mediatek/lvts: Add
lvts_temp_to_raw variant
On 10/16/25 16:21, Laura Nao wrote:
> MT8196/MT6991 require a different version of lvts_temp_to_raw(),
> specifically the multiplicative inverse of the existing implementation.
> Introduce a variant of the function with inverted calculation logic to
> match this requirement.
>
> This ensures accurate raw value generation for temperature
> thresholds, avoiding spurious thermal interrupts or unintended hardware
> resets on MT8196/MT6991.
>
> Reviewed-by: Chen-Yu Tsai <wenst@...omium.org>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Reviewed-by: Fei Shao <fshao@...omium.org>
> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> Signed-off-by: Laura Nao <laura.nao@...labora.com>
> ---
> drivers/thermal/mediatek/lvts_thermal.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
> index df1c0f059ad0..31796a5b8858 100644
> --- a/drivers/thermal/mediatek/lvts_thermal.c
> +++ b/drivers/thermal/mediatek/lvts_thermal.c
> @@ -300,6 +300,18 @@ static u32 lvts_temp_to_raw(int temperature, int temp_factor)
> return div_s64(raw_temp, -temp_factor);
> }
>
> +static u32 lvts_temp_to_raw_v2(int temperature, int temp_factor)
Same comment as the previous patch ... _v2 ...
--
<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
Powered by blists - more mailing lists