summaryrefslogtreecommitdiffstats
path: root/sys/arm/samsung
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-10-09 22:49:50 +0000
committerian <ian@FreeBSD.org>2015-10-09 22:49:50 +0000
commit649b177fe3c5df9bfe4b762d42025e6025d770f9 (patch)
treebbb140dc59e21b4f7aac6e3bb75a3e623af290c2 /sys/arm/samsung
parent0fec972d61176205b027afb563c843df9b03d010 (diff)
downloadFreeBSD-src-649b177fe3c5df9bfe4b762d42025e6025d770f9.zip
FreeBSD-src-649b177fe3c5df9bfe4b762d42025e6025d770f9.tar.gz
Use IIC_EBUSBSY and IIC_BUSERR status values consistantly across all drivers.
Make it clearer what each one means in the comments that define them. IIC_BUSBSY was used in many places to mean two different things, either "someone else has reserved the bus so you have to wait until they're done" or "the signal level on the bus was not in the state I expected before/after issuing some command". Now IIC_BUSERR is used consistantly to refer to protocol/signaling errors, and IIC_BUSBSY refers to ownership/reservation of the bus.
Diffstat (limited to 'sys/arm/samsung')
-rw-r--r--sys/arm/samsung/exynos/exynos5_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/samsung/exynos/exynos5_i2c.c b/sys/arm/samsung/exynos/exynos5_i2c.c
index 294249a..d879138 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);
OpenPOWER on IntegriCloud