diff options
author | Gabriele Mazzotta <gabriele.mzt@gmail.com> | 2016-09-20 01:12:43 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-09-21 22:08:42 +0200 |
commit | 983bf1256edb477a376b6ce95adf36e13bc88f9a (patch) | |
tree | 87339d47fde88ccc10a8a42c25c2c3875617c8d7 /drivers/rtc/rtc-stmp3xxx.c | |
parent | 97ea1906b3c2201273ea6bb40c43c611c056ddb3 (diff) | |
download | blackbird-op-linux-983bf1256edb477a376b6ce95adf36e13bc88f9a.tar.gz blackbird-op-linux-983bf1256edb477a376b6ce95adf36e13bc88f9a.zip |
rtc: cmos: Clear ACPI-driven alarms upon resume
Currently ACPI-driven alarms are not cleared when they wake the
system. As consequence, expired alarms must be manually cleared to
program a new alarm. Fix this by correctly handling ACPI-driven
alarms.
More specifically, the ACPI specification [1] provides for two
alternative implementations of the RTC. Depending on the
implementation, the driver either clear the alarm from the resume
callback or from ACPI interrupt handler:
- The platform has the RTC wakeup status fixed in hardware
(ACPI_FADT_FIXED_RTC is 0). In this case the driver can determine
if the RTC was the reason of the wakeup from the resume callback
by reading the RTC status register.
- The platform has no fixed hardware feature event bits. In this
case a GPE is used to wake the system and the driver clears the
alarm from its handler.
[1] http://www.acpi.info/DOWNLOADS/ACPI_5_Errata%20A.pdf
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-stmp3xxx.c')
0 files changed, 0 insertions, 0 deletions