Date: Thu, 27 Jun 2024 10:33:18 GMT From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a743e280ea05 - main - rk_i2c: use the register read mode even if the read ends with IIC_M_NOSTOP Message-ID: <202406271033.45RAXIiB079217@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=a743e280ea0541163afa7d1c320504925a02f80b commit a743e280ea0541163afa7d1c320504925a02f80b Author: Andriy Gapon <avg@FreeBSD.org> AuthorDate: 2024-06-27 07:48:30 +0000 Commit: Andriy Gapon <avg@FreeBSD.org> CommitDate: 2024-06-27 10:32:47 +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 --- sys/dev/iicbus/controller/rockchip/rk_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/controller/rockchip/rk_i2c.c b/sys/dev/iicbus/controller/rockchip/rk_i2c.c index 9f2a98bcea12..d9fcc8fa8a7a 100644 --- a/sys/dev/iicbus/controller/rockchip/rk_i2c.c +++ b/sys/dev/iicbus/controller/rockchip/rk_i2c.c @@ -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;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406271033.45RAXIiB079217>
