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)
commit7b5768486a910532885f01b9d2dad4818c8b3be1
tree6167744caeb0cbd53d7036053252e0b0c352540f
parentbae2f647025549fd2a24f02e9587481a50c0066b
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