diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-07-13 02:26:08 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2016-08-31 18:21:34 +0200 |
commit | 50d6c0ea8111100a102c03b4410ba1e45fa8b771 (patch) | |
tree | e118f6f86d3ff9df9c36223bcbea76f4fa3fb193 /drivers/rtc/Kconfig | |
parent | 59e5e70c9516a0ba34dd5a1a44ed89518cd5eda9 (diff) | |
download | linux-50d6c0ea8111100a102c03b4410ba1e45fa8b771.tar.bz2 |
rtc: ds1307: fix century bit support
Add an option to properly support the century bit of ds1337 and compatibles
and ds1340.
Because the driver had a bug until now, it is not possible to switch users
to the fixed code directly as RTCs in the field will wrongly have the
century bit set.
Acked-by: Arnaud Ebalard <arno@natisbad.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/Kconfig')
-rw-r--r-- | drivers/rtc/Kconfig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 7fc11cdfd27e..6ce3dad73253 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -234,6 +234,20 @@ config RTC_DRV_DS1307_HWMON Say Y here if you want to expose temperature sensor data on rtc-ds1307 (only DS3231) +config RTC_DRV_DS1307_CENTURY + bool "Century bit support for rtc-ds1307" + depends on RTC_DRV_DS1307 + default n + help + The DS1307 driver suffered from a bug where it was enabling the + century bit inconditionnally but never used it when reading the time. + It made the driver unable to support dates beyond 2099. + Setting this option will add proper support for the century bit but if + the time was previously set using a kernel predating this option, + reading the date will return a date in the next century. + To solve that, you could boot a kernel without this option set, set + the RTC date and then boot a kernel with this option set. + config RTC_DRV_DS1374 tristate "Dallas/Maxim DS1374" help |