diff options
author | Tom Rini <trini@konsulko.com> | 2023-06-06 09:46:27 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-06-06 09:46:27 -0400 |
commit | d39277ff4210a1a3e07d40564a19c2e59cec04aa (patch) | |
tree | 21203eab5efc77d2aa99b2b9cf21a58e7cbd6a7e /drivers/i2c/rk_i2c.c | |
parent | 26659d426548d1c395ef878c3b820e53a6e3b346 (diff) | |
parent | 419ddf944cbf376e3c1d5b8571e82d89056bebfa (diff) |
Merge tag 'for-v2023-07-rc4' of https://source.denx.de/u-boot/custodians/u-boot-i2c
i2c updates for v2023-07-rc4
Bugfixes:
- rockchip: De-initialize the bus after start bit failure
from Ondrej Jirman
- cdns: Fix broken retry mechanism on arbitration lost
Diffstat (limited to 'drivers/i2c/rk_i2c.c')
-rw-r--r-- | drivers/i2c/rk_i2c.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/rk_i2c.c b/drivers/i2c/rk_i2c.c index f8fac45b6c..9927af94a8 100644 --- a/drivers/i2c/rk_i2c.c +++ b/drivers/i2c/rk_i2c.c @@ -342,7 +342,7 @@ static int rockchip_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, int nmsgs) { struct rk_i2c *i2c = dev_get_priv(bus); - int ret; + int ret = 0; debug("i2c_xfer: %d messages\n", nmsgs); for (; nmsgs > 0; nmsgs--, msg++) { @@ -356,14 +356,15 @@ static int rockchip_i2c_xfer(struct udevice *bus, struct i2c_msg *msg, } if (ret) { debug("i2c_write: error sending\n"); - return -EREMOTEIO; + ret = -EREMOTEIO; + break; } } rk_i2c_send_stop_bit(i2c); rk_i2c_disable(i2c); - return 0; + return ret; } int rockchip_i2c_set_bus_speed(struct udevice *bus, unsigned int speed) |