Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2c i2c-indirect-config == false --> i2c-no-indire...



details:   https://anonhg.NetBSD.org/src/rev/f22efc9800f9
branches:  trunk
changeset: 972865:f22efc9800f9
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 12 03:32:30 2020 +0000

description:
i2c-indirect-config == false  -->  i2c-no-indirect-config == true

diffstat:

 sys/arch/sparc64/sparc64/autoconf.c |   6 +++---
 sys/dev/fdt/fdt_i2c.c               |   6 +++---
 sys/dev/i2c/i2c.c                   |  15 +++++++--------
 3 files changed, 13 insertions(+), 14 deletions(-)

diffs (106 lines):

diff -r a2c84c376b79 -r f22efc9800f9 sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c       Fri Jun 12 01:20:32 2020 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c       Fri Jun 12 03:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.218 2020/06/09 21:57:00 macallan Exp $ */
+/*     $NetBSD: autoconf.c,v 1.219 2020/06/12 03:32:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.218 2020/06/09 21:57:00 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.219 2020/06/12 03:32:30 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1391,7 +1391,7 @@
                                prop_dictionary_set(props, "i2c-child-devices",
                                    cfg);
                                prop_dictionary_set_bool(props,
-                                   "i2c-indirect-config", false);
+                                   "i2c-no-indirect-config", true);
                        }
 
                        /* ADM1026 at 0x2e */
diff -r a2c84c376b79 -r f22efc9800f9 sys/dev/fdt/fdt_i2c.c
--- a/sys/dev/fdt/fdt_i2c.c     Fri Jun 12 01:20:32 2020 +0000
+++ b/sys/dev/fdt/fdt_i2c.c     Fri Jun 12 03:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_i2c.c,v 1.7 2019/04/24 06:03:02 thorpej Exp $ */
+/* $NetBSD: fdt_i2c.c,v 1.8 2020/06/12 03:32:30 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.7 2019/04/24 06:03:02 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.8 2020/06/12 03:32:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -123,7 +123,7 @@
        prop_object_release(devs);
 
        props = device_properties(dev);
-       prop_dictionary_set_bool(props, "i2c-indirect-config", false);
+       prop_dictionary_set_bool(props, "i2c-no-indirect-config", true);
 
        ret = config_found_ia(dev, "i2cbus", &iba, print);
        if (iba.iba_child_devices)
diff -r a2c84c376b79 -r f22efc9800f9 sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Fri Jun 12 01:20:32 2020 +0000
+++ b/sys/dev/i2c/i2c.c Fri Jun 12 03:32:30 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i2c.c,v 1.73 2020/06/11 02:39:30 thorpej Exp $ */
+/*     $NetBSD: i2c.c,v 1.74 2020/06/12 03:32:30 thorpej Exp $ */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.73 2020/06/11 02:39:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.74 2020/06/12 03:32:30 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -400,7 +400,7 @@
        char *buf;
        i2c_tag_t ic;
        int rv;
-       bool indirect_config;
+       bool no_indirect_config = false;
 
        aprint_naive("\n");
        aprint_normal(": I2C bus\n");
@@ -424,12 +424,11 @@
 
        if (iba->iba_child_devices) {
                child_devices = iba->iba_child_devices;
-               indirect_config = false;
+               no_indirect_config = true;
        } else {
                props = device_properties(parent);
-               if (!prop_dictionary_get_bool(props, "i2c-indirect-config",
-                   &indirect_config))
-                       indirect_config = true;
+               prop_dictionary_get_bool(props, "i2c-no-indirect-config",
+                   &no_indirect_config);
                child_devices = prop_dictionary_get(props, "i2c-child-devices");
        }
 
@@ -495,7 +494,7 @@
                        if (buf)
                                free(buf, M_TEMP);
                }
-       } else if (indirect_config) {
+       } else if (!no_indirect_config) {
                /*
                 * Attach all i2c devices described in the kernel
                 * configuration file.



Home | Main Index | Thread Index | Old Index