diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2021-12-15 08:51:24 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2021-12-15 11:15:58 +0000 |
commit | 7dc8a0e5dff4ad4c9c10442bef5228a91a98d5d6 (patch) | |
tree | 8bd9372d3a62268faf2d05e421e44a0ba762b795 /sys | |
parent | b6a2aba959c8b30d740c653c96c01fb90a3073f7 (diff) | |
download | src-7dc8a0e5dff4ad4c9c10442bef5228a91a98d5d6.tar.gz src-7dc8a0e5dff4ad4c9c10442bef5228a91a98d5d6.zip |
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm64/rockchip/rk_i2c.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/arm64/rockchip/rk_i2c.c index 55cea8895c43..9db6d8739bbd 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -369,8 +369,14 @@ rk_i2c_intr_locked(struct rk_i2c_softc *sc) break; case STATE_WRITE: - if (sc->cnt == sc->msg->len && - !(sc->msg->flags & IIC_M_NOSTOP)) { + if (sc->cnt < sc->msg->len) { + /* Keep writing. */ + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_MBTFIEN | + RK_I2C_IEN_NAKRCVIEN); + transfer_len = rk_i2c_fill_tx(sc); + RK_I2C_WRITE(sc, RK_I2C_MTXCNT, transfer_len); + break; + } else if (!(sc->msg->flags & IIC_M_NOSTOP)) { rk_i2c_send_stop(sc); break; } |