mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rtc: loongson: Add missing alarm notifications for ACPI RTC events
@ 2025-04-29  6:27 Liu Dalin
  2025-05-08  3:12 ` Binbin Zhou
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Liu Dalin @ 2025-04-29  6:27 UTC (permalink / raw)
  To: alexandre.belloni, zhoubinbin, wangming01
  Cc: chenhuacai, gaojuxin, git, jiaxun.yang, keguang.zhang, lixuefeng,
	linux-rtc, linux-kernel

When an application sets and enables an alarm on Loongson RTC devices,
the alarm notification fails to propagate to userspace because the
ACPI event handler omits calling rtc_update_irq().

As a result, processes waiting via select() or poll() on RTC device
files fail to receive alarm notifications.

Fixes: 1b733a9ebc3d ("rtc: Add rtc driver for the Loongson family chips")
Signed-off-by: Liu Dalin <liudalin@kylinsec.com.cn>
---
 drivers/rtc/rtc-loongson.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/rtc/rtc-loongson.c b/drivers/rtc/rtc-loongson.c
index 97e5625c064c..0c573f198f63 100644
--- a/drivers/rtc/rtc-loongson.c
+++ b/drivers/rtc/rtc-loongson.c
@@ -129,6 +129,8 @@ static u32 loongson_rtc_handler(void *id)
 {
 	struct loongson_rtc_priv *priv = (struct loongson_rtc_priv *)id;
 
+	rtc_update_irq(priv->rtcdev, 1, RTC_AF | RTC_IRQF);
+
 	spin_lock(&priv->lock);
 	/* Disable RTC alarm wakeup and interrupt */
 	writel(readl(priv->pm_base + PM1_EN_REG) & ~RTC_EN,
-- 
2.33.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-24 22:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-29  6:27 [PATCH] rtc: loongson: Add missing alarm notifications for ACPI RTC events Liu Dalin
2025-05-08  3:12 ` Binbin Zhou
2025-05-08  6:43   ` liudalin
     [not found]   ` <58BBF92742F0D0E1+2025050814202393211321@kylinos.com.cn>
2025-05-08  6:48     ` Binbin Zhou
2025-05-09  1:40 ` [PATCH V1] " Liu Dalin
2025-05-09  7:12   ` Binbin Zhou
2025-05-09  8:06     ` Liu Dalin
2025-05-09  8:27       ` Binbin Zhou
2025-05-09  8:44 ` [PATCH V2] " Liu Dalin
2025-05-13  7:32   ` Binbin Zhou
2025-05-24 22:28   ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®