]> www.infradead.org Git - users/dwmw2/linux.git/commit
thermal/drivers/mediatek/lvts: Disable monitor mode during suspend
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Mon, 13 Jan 2025 13:27:12 +0000 (10:27 -0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 25 Mar 2025 19:52:04 +0000 (20:52 +0100)
commit65594b3745024857f812145a58db3601d733676c
tree5d703b263d7f4e6ff5ba6e3a90b687db03dc2f0d
parent9e6ec8cf64e2973f0ec74f09023988cabd218426
thermal/drivers/mediatek/lvts: Disable monitor mode during suspend

When configured in filtered mode, the LVTS thermal controller will
monitor the temperature from the sensors and trigger an interrupt once a
thermal threshold is crossed.

Currently this is true even during suspend and resume. The problem with
that is that when enabling the internal clock of the LVTS controller in
lvts_ctrl_set_enable() during resume, the temperature reading can glitch
and appear much higher than the real one, resulting in a spurious
interrupt getting generated.

Disable the temperature monitoring and give some time for the signals to
stabilize during suspend in order to prevent such spurious interrupts.

Cc: stable@vger.kernel.org
Reported-by: Hsin-Te Yuan <yuanhsinte@chromium.org>
Closes: https://lore.kernel.org/all/20241108-lvts-v1-1-eee339c6ca20@chromium.org/
Fixes: 8137bb90600d ("thermal/drivers/mediatek/lvts_thermal: Add suspend and resume")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20250113-mt8192-lvts-filtered-suspend-fix-v2-1-07a25200c7c6@collabora.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/thermal/mediatek/lvts_thermal.c