Hello Peng,
Am 08.07.2018 um 05:46 schrieb Peng Fan:
From: Ye Li <ye...@nxp.com>
In xfer function, both bus_i2c_read and bus_i2c_write will
send a STOP command. This causes a problem when reading register
data from i2c device.
Generally two operations comprise the register data reading:
1. Write the register address to i2c device.
START | chip_addr | W | ACK | register_addr | ACK |
2. Read the Data from i2c device.
START | chip_addr | R | ACK | DATA | NACK | STOP
The STOP command should happen at the end of the transfer, otherwise
we will always get data from register address 0
Signed-off-by: Ye Li <ye...@nxp.com>
Acked-by: Peng Fan <peng....@nxp.com>
Reviewed-by: Heiko Schocher <h...@denx.de>
---
V2: Add review tag
drivers/i2c/imx_lpi2c.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Applied to u-boot-i2c.git master
Thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: h...@denx.de
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot