]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: handle alarms with a minute resolution
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Sun, 7 Nov 2021 22:54:46 +0000 (23:54 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 9 Nov 2021 23:45:56 +0000 (00:45 +0100)
commit8b9a80d4e3d0f688de314d0a25c796451d5e5a0e
tree8dc414966bd5e15e5927c406e34c94cc834f26e6
parentdbc9e7873032ab2758eb5d0514c1e819f7731b21
rtc: handle alarms with a minute resolution

Handle alarms with a minute resolution in the core. Until now drivers have
been open coding the seconds part removal and have been doing that wrongly.
Most of them are rounding up which means the allow the system to miss
deadlines. So, round down and let __rtc_set_alarm return immediately if the
time has already passed.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211107225458.111068-1-alexandre.belloni@bootlin.com
drivers/rtc/interface.c