Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/nvidia Send repeated start after command phase ...



details:   https://anonhg.NetBSD.org/src/rev/51cb12ec6c2e
branches:  trunk
changeset: 346973:51cb12ec6c2e
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Aug 08 14:40:57 2016 +0000

description:
Send repeated start after command phase if there is any data phase
transfer, not just if the data phase a read operation.

diffstat:

 sys/arch/arm/nvidia/tegra_i2c.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4903dddef3e3 -r 51cb12ec6c2e sys/arch/arm/nvidia/tegra_i2c.c
--- a/sys/arch/arm/nvidia/tegra_i2c.c   Mon Aug 08 14:40:19 2016 +0000
+++ b/sys/arch/arm/nvidia/tegra_i2c.c   Mon Aug 08 14:40:57 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_i2c.c,v 1.14 2016/08/08 14:36:56 jakllsch Exp $ */
+/* $NetBSD: tegra_i2c.c,v 1.15 2016/08/08 14:40:57 jakllsch Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.14 2016/08/08 14:36:56 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.15 2016/08/08 14:40:57 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -314,7 +314,7 @@
 
        if (cmdlen > 0) {
                error = tegra_i2c_write(sc, addr, cmdbuf, cmdlen, flags,
-                   I2C_OP_READ_P(op) ? true : false);
+                   buflen > 0 ? true : false);
                if (error) {
                        goto done;
                }



Home | Main Index | Thread Index | Old Index