Skip to content

Commit

Permalink
rtc-cmos: report wakeups from interrupt handler
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Fox authored and Rafael J. Wysocki committed Jul 17, 2012
1 parent 4f31f5b commit b45bae3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/rtc/rtc-cmos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b45bae3

Please sign in to comment.