git: 775224f7e412 - stable/14 - rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 06 Aug 2025 05:55:07 UTC
The branch stable/14 has been updated by avg:
URL: https://cgit.FreeBSD.org/src/commit/?id=775224f7e4123378b06c28f1adcb4d30a0717a92
commit 775224f7e4123378b06c28f1adcb4d30a0717a92
Author: Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2024-06-27 07:48:30 +0000
Commit: Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2025-08-06 05:54:59 +0000
rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP
Tested with max44009(4).
MFC after: 2 weeks
(cherry picked from commit a743e280ea0541163afa7d1c320504925a02f80b)
---
sys/arm64/rockchip/rk_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/arm64/rockchip/rk_i2c.c
index ea32f52876be..6da1d6169ecf 100644
--- a/sys/arm64/rockchip/rk_i2c.c
+++ b/sys/arm64/rockchip/rk_i2c.c
@@ -526,7 +526,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;