diff options
author | Chuanhua Han <chuanhua.han@nxp.com> | 2019-07-08 11:45:25 +0800 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2019-07-09 10:51:12 +0200 |
commit | ef6c26d338a168110b7688b07e319ff46c73748d (patch) | |
tree | 80abc7740b3790154a49419338a8a9f6f4db39ec /configs | |
parent | d3826fb052af9e6df22abaefb1b0c7496e469f9e (diff) |
rtc: pcf2127: Fixed bug with rtc settings and getting error time
The previous pcf2127 RTC chip could not read and set the correct time.
When reading the data of internal registers, the read address was the
value of register plus 1. This is because this chip requires the host
to send a stop signal after setting the register address and before
reading the register data.
This patch sets the register address using dm_i2c_write and reads
the register data using the original dm_i2c_xfer in order to generate
a stop signal after the register address is set, and fixes the bug of
the original read and write time.
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Chuanhua Han <chuanhua.han@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'configs')
0 files changed, 0 insertions, 0 deletions