drivers/rtc/rtc-cmos.c: work around bios clearing rtc control
commit998a06051afe6cba392eab66fa0ef1d7e7376f6c
authorDerek Basehore <dbasehore@chromium.org>
Wed, 3 Jul 2013 22:07:54 +0000 (3 15:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:08:00 +0000 (3 16:08 -0700)
tree99e0a0b8a7b7650782f2751d96b665156d21629f
parentae8458949a57346e17a07768fbdb626cbe993b89
drivers/rtc/rtc-cmos.c: work around bios clearing rtc control

The bios may clear the rtc control register when resuming the system. Since the
cmos interrupt handler may now be run before the rtc_cmos is resumed, this can
cause the interrupt handler to ignore an alarm since the alarm bit is not set in
the rtc control register. To work around this, check if the rtc_cmos is
suspended and use the stored value for the rtc control register.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-cmos.c