]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: isl12022: specify range_min and range_max
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 21 Sep 2022 11:46:17 +0000 (13:46 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 12 Oct 2022 22:17:21 +0000 (00:17 +0200)
commit7984b19da297c131191146a668e4bc728ec373f6
tree29169680ee7e8f37bbfb6ddbd18059e76d551dbc
parent275caa3b929225f761dca86bcd077f7124ddc361
rtc: isl12022: specify range_min and range_max

The isl12022 can (only) keep track of times in the range
2000-2099. The data sheet says

  The calendar registers track date, month, year, and day of the week
  and are accurate through 2099, with automatic leap year correction.

The lower bound of 2000 is obtained by simply observing that its YR
register only counts from 00 through 99.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220921114624.3250848-3-linux@rasmusvillemoes.dk
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-isl12022.c