Commit bcae59d0 authored by Martin Kaiser's avatar Martin Kaiser Committed by Alexandre Belloni

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: default avatarMartin Kaiser <martin@kaiser.cx>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210511161244.16111-1-martin@kaiser.cx
parent 37401019
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment