Skip to content

Commit

Permalink
rtc-at32ap700x: Enable wakeup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Haavard Skinnemoen committed Jul 2, 2008
1 parent c1f598f commit f3a24e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/rtc/rtc-at32ap700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
}

platform_set_drvdata(pdev, rtc);
device_init_wakeup(&pdev->dev, 1);

dev_info(&pdev->dev, "Atmel RTC for AT32AP700x at %08lx irq %ld\n",
(unsigned long)rtc->regs, rtc->irq);
Expand All @@ -284,6 +285,8 @@ static int __exit at32_rtc_remove(struct platform_device *pdev)
{
struct rtc_at32ap700x *rtc = platform_get_drvdata(pdev);

device_init_wakeup(&pdev->dev, 0);

free_irq(rtc->irq, rtc);
iounmap(rtc->regs);
rtc_device_unregister(rtc->rtc);
Expand Down

0 comments on commit f3a24e1

Please sign in to comment.