diff options
author | Ian Lepore <ian@FreeBSD.org> | 2015-10-09 22:49:50 +0000 |
---|---|---|
committer | Ian Lepore <ian@FreeBSD.org> | 2015-10-09 22:49:50 +0000 |
commit | d1e99670ae56b733bfffe627047eb0a552b5ac7e (patch) | |
tree | bbb140dc59e21b4f7aac6e3bb75a3e623af290c2 /sys | |
parent | d2c05e201f2ad287fd1bc68c9a94f3c23f63224a (diff) | |
download | src-d1e99670ae56b733bfffe627047eb0a552b5ac7e.tar.gz src-d1e99670ae56b733bfffe627047eb0a552b5ac7e.zip |
Notes
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arm/freescale/imx/imx_i2c.c | 4 | ||||
-rw-r--r-- | sys/arm/freescale/vybrid/vf_i2c.c | 4 | ||||
-rw-r--r-- | sys/arm/samsung/exynos/exynos5_i2c.c | 4 | ||||
-rw-r--r-- | sys/dev/iicbus/iicoc.c | 2 | ||||
-rw-r--r-- | sys/dev/iicbus/iiconf.h | 4 | ||||
-rw-r--r-- | sys/dev/pcf/pcf.c | 2 | ||||
-rw-r--r-- | sys/powerpc/mpc85xx/i2c.c | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/sys/arm/freescale/imx/imx_i2c.c b/sys/arm/freescale/imx/imx_i2c.c index ad2f6b7adc46..0249275d26f8 100644 --- a/sys/arm/freescale/imx/imx_i2c.c +++ b/sys/arm/freescale/imx/imx_i2c.c @@ -243,7 +243,7 @@ wait_for_xfer(struct i2c_softc *sc, int checkack) sr = i2c_read_reg(sc, I2C_STATUS_REG); if (sr & I2CSR_MIF) { if (sr & I2CSR_MAL) - return (IIC_EBUSBSY); + return (IIC_EBUSERR); else if (checkack && (sr & I2CSR_RXAK)) return (IIC_ENOACK); else @@ -350,7 +350,7 @@ i2c_start(device_t dev, u_char slave, int timeout) i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN); DELAY(10); /* Delay for controller to sample bus state. */ if (i2c_read_reg(sc, I2C_STATUS_REG) & I2CSR_MBB) { - return (i2c_error_handler(sc, IIC_EBUSBSY)); + return (i2c_error_handler(sc, IIC_EBUSERR)); } i2c_write_reg(sc, I2C_CONTROL_REG, I2CCR_MEN | I2CCR_MSTA | I2CCR_MTX); if ((error = wait_for_busbusy(sc, true)) != IIC_NOERR) diff --git a/sys/arm/freescale/vybrid/vf_i2c.c b/sys/arm/freescale/vybrid/vf_i2c.c index c554ce2e2686..8008d1af8973 100644 --- a/sys/arm/freescale/vybrid/vf_i2c.c +++ b/sys/arm/freescale/vybrid/vf_i2c.c @@ -232,7 +232,7 @@ i2c_repeated_start(device_t dev, u_char slave, int timeout) if ((READ1(sc, I2C_IBSR) & IBSR_IBB) == 0) { mtx_unlock(&sc->mutex); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set repeated start condition */ @@ -275,7 +275,7 @@ i2c_start(device_t dev, u_char slave, int timeout) if (READ1(sc, I2C_IBSR) & IBSR_IBB) { mtx_unlock(&sc->mutex); vf_i2c_dbg(sc, "cant i2c start: IIC_EBUSBSY\n"); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set start condition */ diff --git a/sys/arm/samsung/exynos/exynos5_i2c.c b/sys/arm/samsung/exynos/exynos5_i2c.c index 294249a5a354..d8791386bcbb 100644 --- a/sys/arm/samsung/exynos/exynos5_i2c.c +++ b/sys/arm/samsung/exynos/exynos5_i2c.c @@ -263,8 +263,8 @@ i2c_start(device_t dev, u_char slave, int timeout) error = wait_for_nibb(sc); if (error) { mtx_unlock(&sc->mutex); - DPRINTF("cant i2c start: IIC_EBUSBSY\n"); - return (IIC_EBUSBSY); + DPRINTF("cant i2c start: IIC_EBUSERR\n"); + return (IIC_EBUSERR); } reg = READ1(sc, I2CCON); diff --git a/sys/dev/iicbus/iicoc.c b/sys/dev/iicbus/iicoc.c index de17e74ac529..45f1692fa479 100644 --- a/sys/dev/iicbus/iicoc.c +++ b/sys/dev/iicbus/iicoc.c @@ -236,7 +236,7 @@ iicoc_detach(device_t dev) static int iicoc_start(device_t dev, u_char slave, int timeout) { - int error = IIC_EBUSBSY; + int error = IIC_EBUSERR; struct iicoc_softc *sc; sc = device_get_softc(dev); diff --git a/sys/dev/iicbus/iiconf.h b/sys/dev/iicbus/iiconf.h index 092ba8de065e..9ceaeb8bab3c 100644 --- a/sys/dev/iicbus/iiconf.h +++ b/sys/dev/iicbus/iiconf.h @@ -82,10 +82,10 @@ * adapter layer errors */ #define IIC_NOERR 0x0 /* no error occured */ -#define IIC_EBUSERR 0x1 /* bus error */ +#define IIC_EBUSERR 0x1 /* bus error (hardware not in expected state) */ #define IIC_ENOACK 0x2 /* ack not received until timeout */ #define IIC_ETIMEOUT 0x3 /* timeout */ -#define IIC_EBUSBSY 0x4 /* bus busy */ +#define IIC_EBUSBSY 0x4 /* bus busy (reserved by another client) */ #define IIC_ESTATUS 0x5 /* status error */ #define IIC_EUNDERFLOW 0x6 /* slave ready for more data */ #define IIC_EOVERFLOW 0x7 /* too much data */ diff --git a/sys/dev/pcf/pcf.c b/sys/dev/pcf/pcf.c index 55e03460fb7e..f9252b57c638 100644 --- a/sys/dev/pcf/pcf.c +++ b/sys/dev/pcf/pcf.c @@ -170,7 +170,7 @@ pcf_start(device_t dev, u_char slave, int timeout) printf("pcf: busy!\n"); #endif PCF_UNLOCK(sc); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* set slave address to PCF. Last bit (LSB) must be set correctly diff --git a/sys/powerpc/mpc85xx/i2c.c b/sys/powerpc/mpc85xx/i2c.c index f21c845c058a..e02a08bdb554 100644 --- a/sys/powerpc/mpc85xx/i2c.c +++ b/sys/powerpc/mpc85xx/i2c.c @@ -284,7 +284,7 @@ i2c_start(device_t dev, u_char slave, int timeout) debugf("bus busy"); mtx_unlock(&sc->mutex); i2c_stop(dev); - return (IIC_EBUSBSY); + return (IIC_EBUSERR); } /* Set start condition */ |