Re: [PATCH] thermal: core: Check correct temperature for thermal trip notification

From: AngeloGioacchino Del Regno
Date: Mon Sep 25 2023 - 05:53:55 EST


Il 22/09/23 21:27, Nícolas F. R. A. Prado ha scritto:
The thermal trip down notification should be triggered when the
temperature goes below the trip temperature minus the hysteresis. But
while the temperature is correctly checked against that, the last
temperature is instead compared against the trip point temperature. The
end result is that the notification won't always be triggered, only when
the temperature happens to drop quick enough so that the last
temperature was still above the trip point temperature.

Fix the incorrect check.

Fixes: 55cdf0a283b8 ("thermal: core: Add notifications call in the framework")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>


Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>