git: f8f0cae5e06b - stable/13 - 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:46 UTC
The branch stable/13 has been updated by avg:
URL: https://cgit.FreeBSD.org/src/commit/?id=f8f0cae5e06bc3598cc97a618aad62e8c5671bfd
commit f8f0cae5e06bc3598cc97a618aad62e8c5671bfd
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:55:34 +0000
rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP
Tested with max44009(4).
(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 d2f1c2fc4a5b..a4cd07ae9bd4 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;