summaryrefslogtreecommitdiff
path: root/drivers/rtc/Kconfig
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-07-13 02:26:08 +0200
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-08-31 18:21:34 +0200
commit50d6c0ea8111100a102c03b4410ba1e45fa8b771 (patch)
treee118f6f86d3ff9df9c36223bcbea76f4fa3fb193 /drivers/rtc/Kconfig
parent59e5e70c9516a0ba34dd5a1a44ed89518cd5eda9 (diff)
downloadlwn-50d6c0ea8111100a102c03b4410ba1e45fa8b771.tar.gz
lwn-50d6c0ea8111100a102c03b4410ba1e45fa8b771.zip
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/Kconfig14
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