From bcae59d0d45b866d5b9525ea8ece6d671e6767c8 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Tue, 11 May 2021 18:12:44 +0200 Subject: [PATCH] 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 Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210511161244.16111-1-martin@kaiser.cx --- drivers/rtc/rtc-imxdi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index c1806f4d68e7..4b712e5ab08a 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -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;