Skip to content

Commit d401652

Browse files
ppailletdlezcano
authored andcommitted
thermal: stm32: Fix icifr register name
Fix a mistake with the ICIFR register name. Signed-off-by: Pascal Paillet <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 370f995 commit d401652

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/thermal/st/stm_thermal.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define DTS_DR_OFFSET 0x1C
3131
#define DTS_SR_OFFSET 0x20
3232
#define DTS_ITENR_OFFSET 0x24
33-
#define DTS_CIFR_OFFSET 0x28
33+
#define DTS_ICIFR_OFFSET 0x28
3434

3535
/* DTS_CFGR1 register mask definitions */
3636
#define HSREF_CLK_DIV_MASK GENMASK(30, 24)
@@ -122,10 +122,10 @@ static irqreturn_t stm_thermal_alarm_irq_thread(int irq, void *sdata)
122122
value = readl_relaxed(sensor->base + DTS_SR_OFFSET);
123123

124124
if ((value & LOW_THRESHOLD) == LOW_THRESHOLD)
125-
writel_relaxed(LOW_THRESHOLD, sensor->base + DTS_CIFR_OFFSET);
125+
writel_relaxed(LOW_THRESHOLD, sensor->base + DTS_ICIFR_OFFSET);
126126

127127
if ((value & HIGH_THRESHOLD) == HIGH_THRESHOLD)
128-
writel_relaxed(HIGH_THRESHOLD, sensor->base + DTS_CIFR_OFFSET);
128+
writel_relaxed(HIGH_THRESHOLD, sensor->base + DTS_ICIFR_OFFSET);
129129

130130
thermal_zone_device_update(sensor->th_dev, THERMAL_EVENT_UNSPECIFIED);
131131

@@ -347,7 +347,7 @@ static int stm_enable_irq(struct stm_thermal_sensor *sensor)
347347
*/
348348

349349
/* Make sure LOW_THRESHOLD IT is clear before enabling */
350-
writel_relaxed(LOW_THRESHOLD, sensor->base + DTS_CIFR_OFFSET);
350+
writel_relaxed(LOW_THRESHOLD, sensor->base + DTS_ICIFR_OFFSET);
351351

352352
/* Enable IT generation for low threshold */
353353
value = readl_relaxed(sensor->base + DTS_ITENR_OFFSET);
@@ -356,7 +356,7 @@ static int stm_enable_irq(struct stm_thermal_sensor *sensor)
356356
/* Enable the low temperature threshold if needed */
357357
if (sensor->low_temp_enabled) {
358358
/* Make sure HIGH_THRESHOLD IT is clear before enabling */
359-
writel_relaxed(HIGH_THRESHOLD, sensor->base + DTS_CIFR_OFFSET);
359+
writel_relaxed(HIGH_THRESHOLD, sensor->base + DTS_ICIFR_OFFSET);
360360

361361
/* Enable IT generation for high threshold */
362362
value |= HIGH_THRESHOLD;

0 commit comments

Comments
 (0)