提交 f3a24e1e 编写于 作者: H Haavard Skinnemoen

rtc-at32ap700x: Enable wakeup

Call device_init_wakeup() to signal that the RTC is capable of waking
the system. This is needed for rtcwake to work.
Signed-off-by: NHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
上级 c1f598fd
...@@ -265,6 +265,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev) ...@@ -265,6 +265,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
} }
platform_set_drvdata(pdev, rtc); platform_set_drvdata(pdev, rtc);
device_init_wakeup(&pdev->dev, 1);
dev_info(&pdev->dev, "Atmel RTC for AT32AP700x at %08lx irq %ld\n", dev_info(&pdev->dev, "Atmel RTC for AT32AP700x at %08lx irq %ld\n",
(unsigned long)rtc->regs, rtc->irq); (unsigned long)rtc->regs, rtc->irq);
...@@ -284,6 +285,8 @@ static int __exit at32_rtc_remove(struct platform_device *pdev) ...@@ -284,6 +285,8 @@ static int __exit at32_rtc_remove(struct platform_device *pdev)
{ {
struct rtc_at32ap700x *rtc = platform_get_drvdata(pdev); struct rtc_at32ap700x *rtc = platform_get_drvdata(pdev);
device_init_wakeup(&pdev->dev, 0);
free_irq(rtc->irq, rtc); free_irq(rtc->irq, rtc);
iounmap(rtc->regs); iounmap(rtc->regs);
rtc_device_unregister(rtc->rtc); rtc_device_unregister(rtc->rtc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册