drivers/rtc/rtc-bd70528.c | 2 ++ 1 file changed, 2 insertions(+)
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@kemnade.info>
---
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)) {
--
2.47.3
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@kemnade.info>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
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! ~~
On Thu, 10 Sep 2026 13:28:23 +0300
Matti Vaittinen <mazziesaccount@gmail.com> wrote:
> 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@kemnade.info>
>
> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
>
> 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 :)
>
looking at mfd driver:
* BD71815 data-sheet does not list the power-button IRQ so we
* don't use it.
*/
button_irq = 0;
....
if (button_irq) {
ret = rohm_register_pwrbutton(&i2c->dev, button_irq,
"bd71828-pwrkey", true, irq_domain);
if (ret)
return ret;
}
....
so you are right about the power button.
Sashiko wants some error-checking there, so I'll send a
v2 with a fixes-tag and error checking.
Regards,
Andreas
© 2016 - 2026 Red Hat, Inc.