[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230428195347.3832687-4-nfraprado@collabora.com>
Date: Fri, 28 Apr 2023 15:53:47 -0400
From: Nícolas F. R. A. Prado
<nfraprado@...labora.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Alexandre Bailon <abailon@...libre.com>, kernel@...labora.com,
Chen-Yu Tsai <wenst@...omium.org>,
Balsam CHIHI <bchihi@...libre.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Alexandre Mergnat <amergnat@...libre.com>,
Nícolas F. R. A. Prado
<nfraprado@...labora.com>, Amit Kucheria <amitk@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Zhang Rui <rui.zhang@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-pm@...r.kernel.org
Subject: [PATCH 3/3] thermal/drivers/mediatek/lvts_thermal: Disable undesired interrupts
Out of the many interrupts supported by the hardware, the only ones of
interest to the driver currently are:
* The temperature went over the hot threshold, for any of the sensors
* The temperature went over the hot to normal threshold, for any of the
sensors
* The temperature went over the stage3 threshold
These are the only thresholds configured by the driver through the
HTHRE, H2NTHRE, and PROTTC registers, respectively.
The current interrupt mask in LVTS_MONINT_CONF, enables many more
interrupts, including offset detection and data ready on sensors for
both filtered and immediate mode. These are not only not handled by the
driver, but they are also triggered too often, causing unneeded
overhead. Disable these unnecessary interrupts.
The meaning of each bit can be seen in the comment describing
LVTS_MONINTST in the IRQ handler.
Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
drivers/thermal/mediatek/lvts_thermal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index 29d10eaa8dfc..300ce22a7471 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -63,7 +63,7 @@
#define LVTS_HW_FILTER 0x2
#define LVTS_TSSEL_CONF 0x13121110
#define LVTS_CALSCALE_CONF 0x300
-#define LVTS_MONINT_CONF 0x9FBF7BDE
+#define LVTS_MONINT_CONF 0x84804A52
#define LVTS_INT_SENSOR0 0x0009001F
#define LVTS_INT_SENSOR1 0x001203E0
--
2.40.0
Powered by blists - more mailing lists