]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/rtc/rtc-isl12057.c: fix masking of register values
authorArnaud Ebalard <arno@natisbad.org>
Wed, 10 Dec 2014 23:54:02 +0000 (15:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:15 +0000 (17:41 -0800)
commit4b0e75b488a5a9277f4d9ea2ab16bc2f1e9627e9
tree61a9d91047ef58d7790c4bc4e49247c9893d846d
parent971d6b57f1105b387008e53af81dd8d1086247ea
drivers/rtc/rtc-isl12057.c: fix masking of register values

When Intersil ISL12057 support was added by commit 5072ac219491 ("rtc: Add
support for Intersil ISL12057 I2C RTC chip"), two masks for time registers
values imported from the device were either wrong or omitted, leading to
additional bits from those registers to impact read values:

 - mask for hour register value when reading it in AM/PM mode. As
   AM/PM mode is not the usual mode used by the driver, this error
   would only have an impact on an externally configured RTC hour
   later read by the driver.
 - mask for month value. The lack of masking would provide an
   erroneous value if century bit is set.

This patch fixes those two masks.

Fixes: 5072ac219491 ("rtc: Add support for Intersil ISL12057 I2C RTC chip")
Signed-off-by: Arnaud Ebalard <arno@natisbad.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>
Acked-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/rtc-isl12057.c