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/69444fa6e6a5
branches:  trunk
changeset: 811694:69444fa6e6a5
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 fd1f33061c51 -r 69444fa6e6a5 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