• Arnaud Ebalard's avatar
    drivers/rtc/rtc-isl12057.c: add support for century bit · b5f4184d
    Arnaud Ebalard authored
    The month register of ISL12057 RTC chip includes a century bit which
    reports overflow of year register from 99 to 0.  This bit can also be
    written, which allows using it to extend the time interval the chip can
    support from 99 to 199 years.
    
    This patch adds support for century overflow bit in tm to regs and regs to
    tm helpers in ISL12057 driver.
    
    This was tested by putting a device 100 years in the future (using a
    specific kernel due to the inability of userland tools such as date or
    hwclock to pass year 2038), rebooting on a kernel w/ this patch applied
    and verifying the device was still 100 years in the future.
    Signed-off-by: default avatarArnaud Ebalard <arno@natisbad.org>
    Suggested-by: default avatarUwe Kleine-König <uwe@kleine-koenig.org>
    Acked-by: default avatarUwe Kleine-König <uwe@kleine-koenig.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Alessandro Zummo <a.zummo@towertech.it>
    Cc: Peter Huewe <peter.huewe@infineon.com>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Thierry Reding <treding@nvidia.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Grant Likely <grant.likely@linaro.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b5f4184d
rtc-isl12057.c 9.31 KB