summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-01-08 09:04:50 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-17 16:20:55 +0300
commit989515647e783221f9737ed1cf519573d26ce99b (patch)
treed908376f5a2c6c0e4455dcb1ee26c3a99f4a342f /net
parent4c4e5df1f346f70802bf4999de13d06dbbdf7a01 (diff)
downloadlinux-989515647e783221f9737ed1cf519573d26ce99b.tar.xz
rtc: Add one offset seconds to expand RTC range
From our investigation for all RTC drivers, 1 driver will be expired before year 2017, 7 drivers will be expired before year 2038, 23 drivers will be expired before year 2069, 72 drivers will be expired before 2100 and 104 drivers will be expired before 2106. Especially for these early expired drivers, we need to expand the RTC range to make the RTC can still work after the expired year. So we can expand the RTC range by adding one offset to the time when reading from hardware, and subtracting it when writing back. For example, if you have an RTC that can do 100 years, and currently is configured to be based in Jan 1 1970, so it can represents times from 1970 to 2069. Then if you change the start year from 1970 to 2000, which means it can represents times from 2000 to 2099. By adding or subtracting the offset produced by moving the wrap point, all times between 1970 and 1999 from RTC hardware could get interpreted as times from 2070 to 2099, but the interpretation of dates between 2000 and 2069 would not change. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions