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 only send repeat start if we are doing w...



details:   https://anonhg.NetBSD.org/src/rev/259a76b4356c
branches:  trunk
changeset: 341552:259a76b4356c
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Nov 11 12:28:15 2015 +0000

description:
only send repeat start if we are doing write-then-read

diffstat:

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

diffs (28 lines):

diff -r 2c79084c5d24 -r 259a76b4356c sys/arch/arm/nvidia/tegra_i2c.c
--- a/sys/arch/arm/nvidia/tegra_i2c.c   Wed Nov 11 11:32:01 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_i2c.c   Wed Nov 11 12:28:15 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_i2c.c,v 1.6 2015/11/11 11:32:01 jmcneill Exp $ */
+/* $NetBSD: tegra_i2c.c,v 1.7 2015/11/11 12:28:15 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.6 2015/11/11 11:32:01 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.7 2015/11/11 12:28:15 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -239,7 +239,8 @@
        }
 
        if (cmdlen > 0) {
-               error = tegra_i2c_write(sc, addr, cmdbuf, cmdlen, flags, true);
+               error = tegra_i2c_write(sc, addr, cmdbuf, cmdlen, flags,
+                   I2C_OP_READ_P(op) ? true : false);
                if (error) {
                        goto done;
                }



Home | Main Index | Thread Index | Old Index