Module Name:    src
Committed By:   thorpej
Date:           Fri Jun 12 03:32:30 UTC 2020

Modified Files:
        src/sys/arch/sparc64/sparc64: autoconf.c
        src/sys/dev/fdt: fdt_i2c.c
        src/sys/dev/i2c: i2c.c

Log Message:
i2c-indirect-config == false  -->  i2c-no-indirect-config == true


To generate a diff of this commit:
cvs rdiff -u -r1.218 -r1.219 src/sys/arch/sparc64/sparc64/autoconf.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/fdt/fdt_i2c.c
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/i2c/i2c.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.218 src/sys/arch/sparc64/sparc64/autoconf.c:1.219
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.218	Tue Jun  9 21:57:00 2020
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Fri Jun 12 03:32:30 2020
@@ -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 @@ noether:
 				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 */

Index: src/sys/dev/fdt/fdt_i2c.c
diff -u src/sys/dev/fdt/fdt_i2c.c:1.7 src/sys/dev/fdt/fdt_i2c.c:1.8
--- src/sys/dev/fdt/fdt_i2c.c:1.7	Wed Apr 24 06:03:02 2019
+++ src/sys/dev/fdt/fdt_i2c.c	Fri Jun 12 03:32:30 2020
@@ -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 <[email protected]>
@@ -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 @@ fdtbus_attach_i2cbus(device_t dev, int p
 	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)

Index: src/sys/dev/i2c/i2c.c
diff -u src/sys/dev/i2c/i2c.c:1.73 src/sys/dev/i2c/i2c.c:1.74
--- src/sys/dev/i2c/i2c.c:1.73	Thu Jun 11 02:39:30 2020
+++ src/sys/dev/i2c/i2c.c	Fri Jun 12 03:32:30 2020
@@ -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 @@ iic_attach(device_t parent, device_t sel
 	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 @@ iic_attach(device_t parent, device_t sel
 
 	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 @@ iic_attach(device_t parent, device_t sel
 			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.

Reply via email to