rtc: omap: restore back (hard-code) wakeup support
authorHebbar Gururaja <gururaja.hebbar@ti.com>
Wed, 3 Jul 2013 22:08:02 +0000 (15:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:08:00 +0000 (16:08 -0700)
rtc-omap driver modules is used both by OMAP1/2, Davinci SoC platforms.

However, rtc wake support on OMAP1 is broken.  Hence the
device_init_wakeup() was removed from rtc-omap driver and moved to
platform board files that supported it (DA850/OMAP-L138).  [1]

However, recently [2] it was suggested that driver should always do a
device_init_wakeup(dev, true). Platforms that don't want/need
wakeup support can disable it from userspace via:

    echo disabled > /sys/devices/.../power/wakeup

Also, with the new DT boot-up, board file doesn't exist and hence there
is no way to have device wakeup support rtc.

The fix for above issues, is to hard code device_init_wakeup() inside
driver and let platforms that don't need this, handle it through the
sysfs power entry.

[1]
https://patchwork.kernel.org/patch/136731/

[2]
http://www.mail-archive.com/davinci-linux-open-source@linux.
davincidsp.com/msg26077.html

Signed-off-by: Hebbar Gururaja <gururaja.hebbar@ti.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-omap.c

index 6f6ac033d5d973168cd09d0ff7309f38f60875e3..c6ffbaec32a4b509609fe03dad3e57b2db16e439 100644 (file)
@@ -421,6 +421,8 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
         *    is write-only, and always reads as zero...)
         */
 
+       device_init_wakeup(&pdev->dev, true);
+
        if (new_ctrl & (u8) OMAP_RTC_CTRL_SPLIT)
                pr_info("%s: split power mode\n", pdev->name);
 
This page took 0.041774 seconds and 5 git commands to generate.