diff options
author | Guenter Roeck <linux@roeck-us.net> | 2022-10-29 03:54:00 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2022-11-15 23:01:51 +0300 |
commit | f27efee663701f0e93351cf052677214fed40a42 (patch) | |
tree | 626cd1f1dd1fdd7473255e01d60d0e5b4a167f0f /Documentation | |
parent | 741a2830734bc22238e5c248630311e401481ecc (diff) | |
download | linux-f27efee663701f0e93351cf052677214fed40a42.tar.xz |
rtc: cros-ec: Limit RTC alarm range if needed
RTC chips on some older Chromebooks can only handle alarms less than 24
hours in the future. Attempts to set an alarm beyond that range fails.
The most severe impact of this limitation is that suspend requests fail
if alarmtimer_suspend() tries to set an alarm for more than 24 hours
in the future.
Try to set the real-time alarm to just below 24 hours if setting it to
a larger value fails to work around the problem. While not perfect, it
is better than just failing the call. A similar workaround is already
implemented in the rtc-tps6586x driver.
Drop error messages in cros_ec_rtc_get() and cros_ec_rtc_set() since the
calling code also logs an error and to avoid spurious error messages if
setting the alarm ultimately succeeds.
Cc: Brian Norris <briannorris@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Commit: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20221029005400.2712577-1-linux@roeck-us.net
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions