]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Mon, 13 Jan 2025 13:27:14 +0000 (10:27 -0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 25 Mar 2025 19:52:04 +0000 (20:52 +0100)
commitfa17ff8e325a657c84be1083f06e54ee7eea82e4
treea8f635c4f4e196683493fa7dafac0791e2a92a1a
parentc612cbcdf603aefb3358b2e3964dcd5aa3f827a0
thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold

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>
drivers/thermal/mediatek/lvts_thermal.c