Skip to content

Commit 13f03bc

Browse files
wensdlezcano
authored andcommitted
thermal/drivers/mediatek/lvts_thermal: Fix sensor 1 interrupt status bitmask
The binary representation for sensor 1 interrupt status was incorrectly assembled, when compared to the full table given in the same comment section. The conversion into hex was also incorrect, leading to incorrect interrupt status bitmask for sensor 1. This would cause the driver to incorrectly identify changes for sensor 1, when in fact it was sensor 0, or a sensor access time out. Fix the binary and hex representations in the comments, and the actual bitmask macro. Fixes: f5f633b ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230328031017.1360976-1-wenst@chromium.org
1 parent 45cc9c4 commit 13f03bc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/thermal/mediatek/lvts_thermal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define LVTS_MONINT_CONF 0x9FBF7BDE
6767

6868
#define LVTS_INT_SENSOR0 0x0009001F
69-
#define LVTS_INT_SENSOR1 0X000881F0
69+
#define LVTS_INT_SENSOR1 0x001203E0
7070
#define LVTS_INT_SENSOR2 0x00247C00
7171
#define LVTS_INT_SENSOR3 0x1FC00000
7272

@@ -395,8 +395,8 @@ static irqreturn_t lvts_ctrl_irq_handler(struct lvts_ctrl *lvts_ctrl)
395395
* => 0x1FC00000
396396
* sensor 2 interrupt: 0000 0000 0010 0100 0111 1100 0000 0000
397397
* => 0x00247C00
398-
* sensor 1 interrupt: 0000 0000 0001 0001 0000 0011 1110 0000
399-
* => 0X000881F0
398+
* sensor 1 interrupt: 0000 0000 0001 0010 0000 0011 1110 0000
399+
* => 0X001203E0
400400
* sensor 0 interrupt: 0000 0000 0000 1001 0000 0000 0001 1111
401401
* => 0x0009001F
402402
*/

0 commit comments

Comments
 (0)