[PATCH v3 2/4] rtc: pcf85063: do not clear AIE in the interrupt handler
From: A. Sverdlin
Date: Fri Aug 28 2026 - 12:46:06 EST
From: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx>
The interrupt handler cleared the alarm interrupt enable (AIE) bit while
acknowledging the alarm flag (AF). This races with process-context updates
of AIE in pcf85063_rtc_alarm_irq_enable() and pcf85063_rtc_set_alarm():
a handler running concurrently can clobber an AIE change.
The RTC core already disables the alarm interrupt after a one-shot alarm
via the .alarm_irq_enable callback, so the handler does not need to touch
AIE at all. Acknowledge AF only and leave AIE management to the core.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@xxxxxxxxxxx>
---
Changelog:
v3:
- new patch (pre-existing issue found by Sashiko)
drivers/rtc/rtc-pcf85063.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index ac9ab1c376c0b..af900fe8ae15e 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -238,8 +238,7 @@ static irqreturn_t pcf85063_rtc_handle_irq(int irq, void *dev_id)
if (val & PCF85063_CTRL2_AF) {
rtc_update_irq(pcf85063->rtc, 1, RTC_IRQF | RTC_AF);
regmap_update_bits(pcf85063->regmap, PCF85063_REG_CTRL2,
- PCF85063_CTRL2_AIE | PCF85063_CTRL2_AF,
- 0);
+ PCF85063_CTRL2_AF, 0);
return IRQ_HANDLED;
}
--
2.55.0