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/f97211c2540d
branches:  trunk
changeset: 847451:f97211c2540d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Dec 23 14:55:22 2019 +0000

description:
No need to use I2C_F_POLL here.

diffstat:

 sys/dev/i2c/spdmem_i2c.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (67 lines):

diff -r 8f0b694860ac -r f97211c2540d sys/dev/i2c/spdmem_i2c.c
--- a/sys/dev/i2c/spdmem_i2c.c  Mon Dec 23 14:41:41 2019 +0000
+++ b/sys/dev/i2c/spdmem_i2c.c  Mon Dec 23 14:55:22 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem_i2c.c,v 1.17 2018/10/20 03:23:05 macallan Exp $ */
+/* $NetBSD: spdmem_i2c.c,v 1.18 2019/12/23 14:55:22 thorpej Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.17 2018/10/20 03:23:05 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem_i2c.c,v 1.18 2019/12/23 14:55:22 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -114,9 +114,9 @@
         * doesn't exist at the address.
         */
        rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, &reg, 1,
-           &byte0, 1, I2C_F_POLL);
+           &byte0, 1, 0);
        rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, &reg, 1,
-           &byte2, 1, I2C_F_POLL);
+           &byte2, 1, 0);
        if (rv != 0)
                goto error;
 
@@ -143,7 +143,7 @@
                 * I don't know whether our icc_exec()'s API is good or not.
                 */
                rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_page0,
-                   &reg, 1, &dummy, 1, I2C_F_POLL);
+                   &reg, 1, &dummy, 1, 0);
                if (rv != 0) {
                        /*
                         * The possibilities are:
@@ -153,7 +153,7 @@
                         * Is there no way to distinguish them now?
                         */
                        rv = iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
-                           sc->sc_page0, &reg, 1, &dummy, 1, I2C_F_POLL);
+                           sc->sc_page0, &reg, 1, &dummy, 1, 0);
                        if (rv == 0) {
                                aprint_debug("Page 1 was selected. Page 0 is "
                                    "selected now.\n");
@@ -269,14 +269,14 @@
 
        if (addr & 0x100) {
                rv = iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, sc->sc_page1,
-                   &dummy, 1, &dummy, 1, I2C_F_POLL);
+                   &dummy, 1, &dummy, 1, 0);
                rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
-                   &reg, 1, val, 1, I2C_F_POLL);
+                   &reg, 1, val, 1, 0);
                rv |= iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP,
-                   sc->sc_page0, &dummy, 1, &dummy, 1, I2C_F_POLL);
+                   sc->sc_page0, &dummy, 1, &dummy, 1, 0);
        } else {
                rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
-                   &reg, 1, val, 1, I2C_F_POLL);
+                   &reg, 1, val, 1, 0);
        }
 
        iic_release_bus(sc->sc_tag, 0);



Home | Main Index | Thread Index | Old Index