Re: [PATCH] rtc: bd70528: properly enable wakeup
From: Matti Vaittinen
Date: Thu Sep 10 2026 - 06:37:05 EST
On 10/09/2026 12:25, Andreas Kemnade wrote:
Wakeup on RTC alarm now only accidentially works when wakeup for the power
button connected to the same PMIC is also enabled. Fix that by properly
specifying the wakeup irq.
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
Reviewed-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Thanks!
By the way, I am not 100% sure all of the PMICs using this driver even have a power button input. I suspect some doesn't (maybe bd71815). I wouldn't be against Fixes -tag :)
---
drivers/rtc/rtc-bd70528.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/rtc/rtc-bd70528.c b/drivers/rtc/rtc-bd70528.c
index 482810b61495d..dc86882562abd 100644
--- a/drivers/rtc/rtc-bd70528.c
+++ b/drivers/rtc/rtc-bd70528.c
@@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <linux/pm_wakeirq.h>
#include <linux/regmap.h>
#include <linux/rtc.h>
@@ -320,6 +321,7 @@ static int bd70528_probe(struct platform_device *pdev)
device_set_wakeup_capable(&pdev->dev, true);
device_wakeup_enable(&pdev->dev);
+ devm_pm_set_wake_irq(&pdev->dev, irq);
rtc = devm_rtc_allocate_device(&pdev->dev);
if (IS_ERR(rtc)) {
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~