]> 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)
commit45f8d2fc2b55699d00364bf1176d0990fa972fbe
tree6167744caeb0cbd53d7036053252e0b0c352540f
parentbfda7df58cf22f1aed5b049c32b5786492a6d3c8
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