diff options
author | Johan Hovold <johan@kernel.org> | 2014-12-10 18:53:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 20:41:14 -0500 |
commit | 8ad5c722d592ae1965195651965c02396b42fe1a (patch) | |
tree | 2da2c70ddd41d6d3eced2d484a194a03d83ef731 /drivers/rtc/rtc-omap.c | |
parent | 222a12fca6048249d9007f2a4c5fbcea532e8522 (diff) |
rtc: omap: enable wake-up from power off
The ALARM interrupt must not be disabled during shutdown in order to be
able to power up the system using an RTC alarm.
Signed-off-by: Johan Hovold <johan@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Benot Cousson <bcousson@baylibre.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Keerthy J <j-keerthy@ti.com>
Tested-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-omap.c')
-rw-r--r-- | drivers/rtc/rtc-omap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index e83f51ae7f63..0dfb0404f867 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c | |||
@@ -694,8 +694,15 @@ static SIMPLE_DEV_PM_OPS(omap_rtc_pm_ops, omap_rtc_suspend, omap_rtc_resume); | |||
694 | static void omap_rtc_shutdown(struct platform_device *pdev) | 694 | static void omap_rtc_shutdown(struct platform_device *pdev) |
695 | { | 695 | { |
696 | struct omap_rtc *rtc = platform_get_drvdata(pdev); | 696 | struct omap_rtc *rtc = platform_get_drvdata(pdev); |
697 | u8 mask; | ||
697 | 698 | ||
698 | rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0); | 699 | /* |
700 | * Keep the ALARM interrupt enabled to allow the system to power up on | ||
701 | * alarm events. | ||
702 | */ | ||
703 | mask = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG); | ||
704 | mask &= OMAP_RTC_INTERRUPTS_IT_ALARM; | ||
705 | rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, mask); | ||
699 | } | 706 | } |
700 | 707 | ||
701 | static struct platform_driver omap_rtc_driver = { | 708 | static struct platform_driver omap_rtc_driver = { |