rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP

Tested with max44009(4).

MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2024-06-27 10:48:30 +03:00
parent 0deaf4be34
commit a743e280ea

View file

@ -525,7 +525,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs)
if (nmsgs - i >= 2 && msgs[i].len < 4 &&
msgs[i].flags == (IIC_M_WR | IIC_M_NOSTOP) &&
msgs[i + 1].flags == IIC_M_RD &&
(msgs[i + 1].flags & IIC_M_RD) == IIC_M_RD &&
(msgs[i].slave & ~LSB) == (msgs[i + 1].slave & ~LSB)) {
sc->mode = RK_I2C_CON_MODE_RRX;