mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
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:
parent
0deaf4be34
commit
a743e280ea
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue