bc67727423d0f8801024e94e760ea96665a97838
[openwrt/staging/neocturne.git] /
1 From 27b389d9f62c2174f95fe4002b11e77d4cb3ce80 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?=
3 <nfraprado@collabora.com>
4 Date: Thu, 6 Jul 2023 11:37:32 -0400
5 Subject: [PATCH 25/42] thermal/drivers/mediatek/lvts_thermal: Handle IRQ on
6 all controllers
7 MIME-Version: 1.0
8 Content-Type: text/plain; charset=UTF-8
9 Content-Transfer-Encoding: 8bit
10
11 There is a single IRQ handler for each LVTS thermal domain, and it is
12 supposed to check each of its underlying controllers for the origin of
13 the interrupt and clear its status. However due to a typo, only the
14 first controller was ever being handled, which resulted in the interrupt
15 never being cleared when it happened on the other controllers. Add the
16 missing index so interrupts are handled for all controllers.
17
18 Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver")
19 Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
20 Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
21 Tested-by: Chen-Yu Tsai <wenst@chromium.org>
22 Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
23 Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
24 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
25 Link: https://lore.kernel.org/r/20230706153823.201943-2-nfraprado@collabora.com
26 ---
27 drivers/thermal/mediatek/lvts_thermal.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 --- a/drivers/thermal/mediatek/lvts_thermal.c
31 +++ b/drivers/thermal/mediatek/lvts_thermal.c
32 @@ -451,7 +451,7 @@ static irqreturn_t lvts_irq_handler(int
33
34 for (i = 0; i < lvts_td->num_lvts_ctrl; i++) {
35
36 - aux = lvts_ctrl_irq_handler(lvts_td->lvts_ctrl);
37 + aux = lvts_ctrl_irq_handler(&lvts_td->lvts_ctrl[i]);
38 if (aux != IRQ_HANDLED)
39 continue;
40