]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Sat, 6 Sep 2025 20:19:21 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Sep 2025 16:56:29 +0000 (18:56 +0200)
commit30d201ee3a37eff7d96471d1295c021ea36750d4
treeb6f96d538deaa511042475b42f681865117c8b05
parent50ae352c1848cab408fb4f7d7f50c71f818bbdbf
thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold

[ Upstream commit fa17ff8e325a657c84be1083f06e54ee7eea82e4 ]

In order to get working interrupts, a low offset value needs to be
configured. The minimum value for it is 20 Celsius, which is what is
configured when there's no lower thermal trip (ie the thermal core
passes -INT_MAX as low trip temperature). However, when the temperature
gets that low and fluctuates around that value it causes an interrupt
storm.

Prevent that interrupt storm by not enabling the low offset interrupt if
the low threshold is the minimum one.

Cc: stable@vger.kernel.org
Fixes: 77354eaef821 ("thermal/drivers/mediatek/lvts_thermal: Don't leave threshold zeroed")
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-3-07a25200c7c6@collabora.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
[ Adapted interrupt mask definitions ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thermal/mediatek/lvts_thermal.c