Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/i2c No need to use I2C_F_POLL here.



details:   https://anonhg.NetBSD.org/src/rev/c3933d638119
branches:  trunk
changeset: 967845:c3933d638119
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Dec 23 19:35:07 2019 +0000

description:
No need to use I2C_F_POLL here.

diffstat:

 sys/dev/i2c/sy8106a.c |  12 ++++++------
 sys/dev/i2c/tcagpio.c |  12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diffs (66 lines):

diff -r 2ade7808fa18 -r c3933d638119 sys/dev/i2c/sy8106a.c
--- a/sys/dev/i2c/sy8106a.c     Mon Dec 23 19:30:12 2019 +0000
+++ b/sys/dev/i2c/sy8106a.c     Mon Dec 23 19:35:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sy8106a.c,v 1.4 2018/06/26 06:03:57 thorpej Exp $ */
+/* $NetBSD: sy8106a.c,v 1.5 2019/12/23 19:35:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sy8106a.c,v 1.4 2018/06/26 06:03:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sy8106a.c,v 1.5 2019/12/23 19:35:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -93,10 +93,10 @@
                aprint_error_dev(sc->sc_dev, "error writing reg %#x: %d\n", reg, error);
 }
 
-#define        I2C_READ(sc, reg)       sy8106a_read((sc), (reg), I2C_F_POLL)
-#define        I2C_WRITE(sc, reg, val) sy8106a_write((sc), (reg), (val), I2C_F_POLL)
-#define        I2C_LOCK(sc)            iic_acquire_bus((sc)->sc_i2c, I2C_F_POLL)
-#define        I2C_UNLOCK(sc)          iic_release_bus((sc)->sc_i2c, I2C_F_POLL)
+#define        I2C_READ(sc, reg)       sy8106a_read((sc), (reg), 0)
+#define        I2C_WRITE(sc, reg, val) sy8106a_write((sc), (reg), (val), 0)
+#define        I2C_LOCK(sc)            iic_acquire_bus((sc)->sc_i2c, 0)
+#define        I2C_UNLOCK(sc)          iic_release_bus((sc)->sc_i2c, 0)
 
 static int
 sy8106a_acquire(device_t dev)
diff -r 2ade7808fa18 -r c3933d638119 sys/dev/i2c/tcagpio.c
--- a/sys/dev/i2c/tcagpio.c     Mon Dec 23 19:30:12 2019 +0000
+++ b/sys/dev/i2c/tcagpio.c     Mon Dec 23 19:35:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcagpio.c,v 1.4 2018/06/26 06:03:57 thorpej Exp $ */
+/* $NetBSD: tcagpio.c,v 1.5 2019/12/23 19:38:58 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcagpio.c,v 1.4 2018/06/26 06:03:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcagpio.c,v 1.5 2019/12/23 19:38:58 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,10 +102,10 @@
                aprint_error_dev(sc->sc_dev, "error writing reg %#x: %d\n", reg, error);
 }
 
-#define        I2C_READ(sc, reg)       tcagpio_read((sc), (reg), I2C_F_POLL)
-#define        I2C_WRITE(sc, reg, val) tcagpio_write((sc), (reg), (val), I2C_F_POLL)
-#define        I2C_LOCK(sc)            iic_acquire_bus((sc)->sc_i2c, I2C_F_POLL)
-#define        I2C_UNLOCK(sc)          iic_release_bus((sc)->sc_i2c, I2C_F_POLL)
+#define        I2C_READ(sc, reg)       tcagpio_read((sc), (reg), 0)
+#define        I2C_WRITE(sc, reg, val) tcagpio_write((sc), (reg), (val), 0)
+#define        I2C_LOCK(sc)            iic_acquire_bus((sc)->sc_i2c, 0)
+#define        I2C_UNLOCK(sc)          iic_release_bus((sc)->sc_i2c, 0)
 
 static int
 tcagpio_gpio_config(struct tcagpio_softc *sc, int pin, int flags)



Home | Main Index | Thread Index | Old Index