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
This commit is contained in:
Родитель
37401019fe
Коммит
bcae59d0d4
|
@ -24,6 +24,7 @@
|
|||
#include <linux/delay.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_wakeirq.h>
|
||||
#include <linux/rtc.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
@ -811,6 +812,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, imxdi);
|
||||
|
||||
device_init_wakeup(&pdev->dev, true);
|
||||
dev_pm_set_wake_irq(&pdev->dev, norm_irq);
|
||||
|
||||
imxdi->rtc->ops = &dryice_rtc_ops;
|
||||
imxdi->rtc->range_max = U32_MAX;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче