From 75ba9f3a6a0bb2153a97e5d9c3d186b6c6e517af Mon Sep 17 00:00:00 2001 From: Alexander Sverdlin Date: Fri, 28 Aug 2026 18:44:40 +0200 Subject: [PATCH] rtc: pcf85063: do not clear AIE in the interrupt handler 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 Link: https://patch.msgid.link/20260828164445.3907839-3-alexander.sverdlin@siemens.com Signed-off-by: Alexandre Belloni --- 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 ac9ab1c376c0..af900fe8ae15 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; }