• Ye Li's avatar
    lpi2c: Fix bus stop problem in xfer · d144f61a
    Ye Li authored
    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: default avatarYe Li <ye.li@nxp.com>
    Acked-by: Peng Fan's avatarPeng Fan <peng.fan@nxp.com>
    Reviewed-by: Heiko Schocher's avatarHeiko Schocher <hs@denx.de>
    d144f61a
Name
Last commit
Last update
Documentation/devicetree/bindings Loading commit data...
Licenses Loading commit data...
api Loading commit data...
arch Loading commit data...
board Loading commit data...
cmd Loading commit data...
common Loading commit data...
configs Loading commit data...
disk Loading commit data...
doc Loading commit data...
drivers Loading commit data...
dts Loading commit data...
env Loading commit data...
examples Loading commit data...
fs Loading commit data...
include Loading commit data...
lib Loading commit data...
net Loading commit data...
post Loading commit data...
scripts Loading commit data...
test Loading commit data...
tools Loading commit data...
.checkpatch.conf Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
config.mk Loading commit data...