rtc: cmos: introduce quirks to enable use_acpi_alarm mode
authorZhang Rui <rui.zhang@intel.com>
Mon, 26 Mar 2018 13:58:03 +0000 (21:58 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 19 Apr 2018 16:01:50 +0000 (18:01 +0200)
commit36d91a4d401c284ab21213622c85cd855725f10f
tree5534d27f39b371b19157ceaf234ac9146a35ab59
parentc6d3a278cc1201a93677737db565c25c58b2cfe0
rtc: cmos: introduce quirks to enable use_acpi_alarm mode

Use ACPI for RTC Alarm only for Intel platforms
1. with Low Power S0 support
2. with HPET RTC emulation enabled
3. no earlier than 2015

Note that, during the test, it is found that this patch
1. works in 4.15-rc kernel
2. hangs the platform after suspend-to-idle for 2 or 3 times, in 4.15.0
3. works again in 4.16-rc3 kernel.
4. works in the latest 4.15.12 stable kernel.

Thus although this patch breaks 4.15.0 kernel for some unknown reason,
still, it is safe for both upstream and backport.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-cmos.c