rtc-at32ap700x: Enable wakeup
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Mon, 30 Jun 2008 08:54:31 +0000 (10:54 +0200)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Wed, 2 Jul 2008 09:05:01 +0000 (11:05 +0200)
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>
drivers/rtc/rtc-at32ap700x.c

index 2ef8cdfda4a74fd506cae8b5cd2d9d14971b4cc4..90b9a6503e1561d2576dbb4ab74bd830bc40e4b4 100644 (file)
@@ -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);
@@ -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);