Skip to content

Commit ed17a2b

Browse files
SiFiveHollandalexandrebelloni
authored andcommitted
rtc: da9063: Mark the alarm IRQ as a wake IRQ
This keeps the IRQ enabled during system suspend, if the RTC's wakeup source is enabled. Since the IRQ is not required to wake from shutdown, continue to add the wakeup source even if registering the wakeirq fails. See commit 029d3a6 ("rtc: da9063: add as wakeup source"). Signed-off-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 58dffa9 commit ed17a2b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/rtc/rtc-da9063.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/module.h>
1212
#include <linux/of.h>
1313
#include <linux/platform_device.h>
14+
#include <linux/pm_wakeirq.h>
1415
#include <linux/regmap.h>
1516
#include <linux/rtc.h>
1617
#include <linux/slab.h>
@@ -496,6 +497,12 @@ static int da9063_rtc_probe(struct platform_device *pdev)
496497
dev_err(&pdev->dev, "Failed to request ALARM IRQ %d: %d\n",
497498
irq_alarm, ret);
498499

500+
ret = dev_pm_set_wake_irq(&pdev->dev, irq_alarm);
501+
if (ret)
502+
dev_warn(&pdev->dev,
503+
"Failed to set IRQ %d as a wake IRQ: %d\n",
504+
irq_alarm, ret);
505+
499506
device_init_wakeup(&pdev->dev, true);
500507

501508
return devm_rtc_register_device(rtc->rtc_dev);

0 commit comments

Comments
 (0)