]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf85063: simplify code to read the current time
authorJuergen Borleis <jbe@pengutronix.de>
Tue, 9 Feb 2016 10:57:25 +0000 (11:57 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 14 Mar 2016 16:08:17 +0000 (17:08 +0100)
commit56f586c41821e730d33f7232127049b99eade0b8
tree6167744caeb0cbd53d7036053252e0b0c352540f
parent158d566404fb7958ee2ff68d938428e014f770e0
rtc: pcf85063: simplify code to read the current time

By using i2c_smbus_read_i2c_block_data() the code is now much simpler.

While at it: when reading the RTC's seconds register, all time/date registers
are frozen until the RTC's year register is read. So it is important to read
all time/date registers in one turn to not lose a second event. Make it more
clear why the read must happen in this way.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-pcf85063.c