Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/linux Provide a definition of I2C_M_ST...



details:   https://anonhg.NetBSD.org/src/rev/876ac83cafef
branches:  trunk
changeset: 1028166:876ac83cafef
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:43:56 2021 +0000

description:
Provide a definition of I2C_M_STOP XXX


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/include/linux/i2c.h |  3 ++-
 sys/external/bsd/drm2/linux/linux_i2c.c   |  7 +++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diffs (45 lines):

diff -r 71aaf2fa9634 -r 876ac83cafef sys/external/bsd/drm2/include/linux/i2c.h
--- a/sys/external/bsd/drm2/include/linux/i2c.h Sun Dec 19 09:43:49 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/i2c.h Sun Dec 19 09:43:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c.h,v 1.9 2021/12/19 00:59:25 riastradh Exp $        */
+/*     $NetBSD: i2c.h,v 1.10 2021/12/19 09:43:56 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -53,6 +53,7 @@
 #define        I2C_M_RD                0x01 /* xfer is read, not write */
 #define        I2C_M_NOSTART           0x02 /* don't initiate xfer */
 #define        I2C_M_TEN               0x04 /* 10-bit chip address */
+#define        I2C_M_STOP              0x08 /* send stop after msg */
 
 /*
  * I2C_CLASS_*: i2c_adapter classes
diff -r 71aaf2fa9634 -r 876ac83cafef sys/external/bsd/drm2/linux/linux_i2c.c
--- a/sys/external/bsd/drm2/linux/linux_i2c.c   Sun Dec 19 09:43:49 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_i2c.c   Sun Dec 19 09:43:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_i2c.c,v 1.4 2021/12/19 00:59:25 riastradh Exp $  */
+/*     $NetBSD: linux_i2c.c,v 1.5 2021/12/19 09:43:56 riastradh Exp $  */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_i2c.c,v 1.4 2021/12/19 00:59:25 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_i2c.c,v 1.5 2021/12/19 09:43:56 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -178,6 +178,9 @@
 linux_i2c_flags_op(uint16_t flags, bool stop)
 {
 
+       if (ISSET(flags, I2C_M_STOP))
+               stop = true;
+
        if (ISSET(flags, I2C_M_RD))
                return (stop? I2C_OP_READ_WITH_STOP : I2C_OP_READ);
        else



Home | Main Index | Thread Index | Old Index