Module Name: src Committed By: thorpej Date: Mon Dec 23 14:55:22 UTC 2019
Modified Files: src/sys/dev/i2c: spdmem_i2c.c Log Message: No need to use I2C_F_POLL here. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/i2c/spdmem_i2c.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/spdmem_i2c.c diff -u src/sys/dev/i2c/spdmem_i2c.c:1.17 src/sys/dev/i2c/spdmem_i2c.c:1.18 --- src/sys/dev/i2c/spdmem_i2c.c:1.17 Sat Oct 20 03:23:05 2018 +++ src/sys/dev/i2c/spdmem_i2c.c Mon Dec 23 14:55:22 2019 @@ -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 @@ spdmem_reset_page(struct spdmem_i2c_soft * doesn't exist at the address. */ rv = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, - &byte0, 1, I2C_F_POLL); + &byte0, 1, 0); rv |= iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, - &byte2, 1, I2C_F_POLL); + &byte2, 1, 0); if (rv != 0) goto error; @@ -143,7 +143,7 @@ spdmem_reset_page(struct spdmem_i2c_soft * 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, - ®, 1, &dummy, 1, I2C_F_POLL); + ®, 1, &dummy, 1, 0); if (rv != 0) { /* * The possibilities are: @@ -153,7 +153,7 @@ spdmem_reset_page(struct spdmem_i2c_soft * Is there no way to distinguish them now? */ rv = iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, - sc->sc_page0, ®, 1, &dummy, 1, I2C_F_POLL); + sc->sc_page0, ®, 1, &dummy, 1, 0); if (rv == 0) { aprint_debug("Page 1 was selected. Page 0 is " "selected now.\n"); @@ -269,14 +269,14 @@ spdmem_i2c_read(struct spdmem_softc *sof 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, - ®, 1, val, 1, I2C_F_POLL); + ®, 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, - ®, 1, val, 1, I2C_F_POLL); + ®, 1, val, 1, 0); } iic_release_bus(sc->sc_tag, 0);