]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00179178 [RTC]Enable both wakealarm and common power wakeup
authorAnson Huang <b20788@freescale.com>
Mon, 9 Apr 2012 07:43:40 +0000 (15:43 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:23 +0000 (08:34 +0200)
For RTC driver, as not all RTCs support alarm and wakeup, so the
framework only support alarm or wakeup, not both of them, as our
rtc can support alarm and wakeup function, to simplify the unit
test interface for power off and wakeup, we add both wakealarm and
common power wakeup sysfs interface to our RTC driver.

Signed-off-by: Anson Huang <b20788@freescale.com>
drivers/rtc/rtc-snvs.c

index 2051e8691a64f2295c762f5c3250c675791db659..41470e95493872439f91af1c6bd470db3ad36511 100644 (file)
@@ -609,6 +609,9 @@ static int snvs_rtc_probe(struct platform_device *pdev)
        tv.tv_nsec = 0;
        tv.tv_sec = rtc_read_lp_counter(ioaddr + SNVS_LPSRTCMR);
 
+       /* Remove can_wakeup flag to add common power wakeup interface */
+       pdev->dev.power.can_wakeup = 0;
+
        /* By default, devices should wakeup if they can */
        /* So snvs is set as "should wakeup" as it can */
        device_init_wakeup(&pdev->dev, 1);