summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fox <pgf@laptop.org>2012-07-16 21:56:26 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-17 22:14:48 +0200
commitb45bae36b805287c76366c908de58b5c2c0d46b0 (patch)
tree5074191c9cfe413e0c79b0cd5314adc5d4499081
parent4f31f5b19eb0418a847b989abc9ac22af1991fe2 (diff)
downloadop-kernel-dev-b45bae36b805287c76366c908de58b5c2c0d46b0.zip
op-kernel-dev-b45bae36b805287c76366c908de58b5c2c0d46b0.tar.gz
rtc-cmos: report wakeups from interrupt handler
When suspending the system with an important RTC wake alarm active, it is possible that the RTC alarm will expire before the system has gone to sleep (e.g. short alarm timer, or an unusually long suspend routine). If this happens, the RTC alarm should trigger a wakeup event, possibly aborting system suspend. This condition can be detected in the form of an RTC alarm interrupt. Signed-off-by: Paul Fox <pgf@laptop.org> Signed-off-by: Daniel Drake <dsd@laptop.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--drivers/rtc/rtc-cmos.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 4267789..132333d 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -568,6 +568,7 @@ static irqreturn_t cmos_interrupt(int irq, void *p)
hpet_mask_rtc_irq_bit(RTC_AIE);
CMOS_READ(RTC_INTR_FLAGS);
+ pm_wakeup_event(cmos_rtc.dev, 0);
}
spin_unlock(&rtc_lock);
OpenPOWER on IntegriCloud