mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Tony Lindgren <[email protected]> Cc: Benot Cousson <[email protected]> Cc: Lokesh Vutla <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Sekhar Nori <[email protected]> Cc: Tero Kristo <[email protected]> Cc: Keerthy J <[email protected]> Tested-by: Felipe Balbi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
222a12fca6
commit
8ad5c722d5
1 changed files with 8 additions and 1 deletions
|
|
@ -694,8 +694,15 @@ static SIMPLE_DEV_PM_OPS(omap_rtc_pm_ops, omap_rtc_suspend, omap_rtc_resume);
|
|||
static void omap_rtc_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
struct omap_rtc *rtc = platform_get_drvdata(pdev);
|
||||
u8 mask;
|
||||
|
||||
rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, 0);
|
||||
/*
|
||||
* Keep the ALARM interrupt enabled to allow the system to power up on
|
||||
* alarm events.
|
||||
*/
|
||||
mask = rtc_read(rtc, OMAP_RTC_INTERRUPTS_REG);
|
||||
mask &= OMAP_RTC_INTERRUPTS_IT_ALARM;
|
||||
rtc_write(rtc, OMAP_RTC_INTERRUPTS_REG, mask);
|
||||
}
|
||||
|
||||
static struct platform_driver omap_rtc_driver = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue