git: c2c3617082ed - stable/13 - rk_i2c_transfer: use iicbus error codes instead of generic ones
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Dec 2021 06:51:25 UTC
The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=c2c3617082edc7b92c08437774a49668d73bc8e1 commit c2c3617082edc7b92c08437774a49668d73bc8e1 Author: Andriy Gapon <avg@FreeBSD.org> AuthorDate: 2021-12-15 08:38:24 +0000 Commit: Andriy Gapon <avg@FreeBSD.org> CommitDate: 2021-12-22 06:49:15 +0000 rk_i2c_transfer: use iicbus error codes instead of generic ones (cherry picked from commit 552503aca975ccab1b1f67f95f627e279db5826f) --- sys/arm64/rockchip/rk_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/arm64/rockchip/rk_i2c.c index 8d2a3e0ead01..7b3ebb090fae 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -457,7 +457,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) /* Validate parameters. */ if (msgs == NULL || msgs[i].buf == NULL || msgs[i].len == 0) { - err = EINVAL; + err = IIC_ENOTSUPP; break; } /* @@ -469,7 +469,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) ((msgs[i].flags & IIC_M_RD) != (msgs[i + 1].flags & IIC_M_RD) || (msgs[i].slave != msgs[i + 1].slave))) { - err = EINVAL; + err = IIC_ENOTSUPP; break; } } @@ -528,7 +528,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) DELAY(1000); } if (timeout <= 0) - err = ETIMEDOUT; + err = IIC_ETIMEOUT; } else { while (err == 0 && sc->transfer_done != 1) { err = msleep(sc, &sc->mtx, PZERO, "rk_i2c",