aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-06-30 04:54:31 -0400
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-07-02 05:05:01 -0400
commitf3a24e1e272f844a4d14a39731b4fa946ba36adc (patch)
treeec61db81fca4f7060a22f838729ea6b7284e8d46 /drivers/rtc
parentc1f598fd71db6a971ee88311167c8003243ebff2 (diff)
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: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Cc: Alessandro Zummo <a.zummo@towertech.it>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-at32ap700x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index 2ef8cdfda4a7..90b9a6503e15 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -265,6 +265,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
265 } 265 }
266 266
267 platform_set_drvdata(pdev, rtc); 267 platform_set_drvdata(pdev, rtc);
268 device_init_wakeup(&pdev->dev, 1);
268 269
269 dev_info(&pdev->dev, "Atmel RTC for AT32AP700x at %08lx irq %ld\n", 270 dev_info(&pdev->dev, "Atmel RTC for AT32AP700x at %08lx irq %ld\n",
270 (unsigned long)rtc->regs, rtc->irq); 271 (unsigned long)rtc->regs, rtc->irq);
@@ -284,6 +285,8 @@ static int __exit at32_rtc_remove(struct platform_device *pdev)
284{ 285{
285 struct rtc_at32ap700x *rtc = platform_get_drvdata(pdev); 286 struct rtc_at32ap700x *rtc = platform_get_drvdata(pdev);
286 287
288 device_init_wakeup(&pdev->dev, 0);
289
287 free_irq(rtc->irq, rtc); 290 free_irq(rtc->irq, rtc);
288 iounmap(rtc->regs); 291 iounmap(rtc->regs);
289 rtc_device_unregister(rtc->rtc); 292 rtc_device_unregister(rtc->rtc);