Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: imxdi: add wakeup support

The DryIce-based RTC supports alarms that trigger an interrupt.

Configure this interrupt as a wakeup source that wakes the system up
from standby mode.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210511161244.16111-1-martin@kaiser.cx

authored by

Martin Kaiser and committed by
Alexandre Belloni
bcae59d0 37401019

+4
+4
drivers/rtc/rtc-imxdi.c
··· 24 24 #include <linux/delay.h> 25 25 #include <linux/module.h> 26 26 #include <linux/platform_device.h> 27 + #include <linux/pm_wakeirq.h> 27 28 #include <linux/rtc.h> 28 29 #include <linux/sched.h> 29 30 #include <linux/spinlock.h> ··· 811 810 } 812 811 813 812 platform_set_drvdata(pdev, imxdi); 813 + 814 + device_init_wakeup(&pdev->dev, true); 815 + dev_pm_set_wake_irq(&pdev->dev, norm_irq); 814 816 815 817 imxdi->rtc->ops = &dryice_rtc_ops; 816 818 imxdi->rtc->range_max = U32_MAX;