Module Name: src
Committed By: jakllsch
Date: Wed Sep 26 20:03:36 UTC 2018
Modified Files:
src/sys/dev/fdt: fdt_i2c.c
src/sys/dev/ofw: ofw_subr.c
Log Message:
Set "i2c-indirect-config" to false in the right place so that iic(4)
better behaves itself.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/fdt_i2c.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/ofw/ofw_subr.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/dev/fdt/fdt_i2c.c
diff -u src/sys/dev/fdt/fdt_i2c.c:1.4 src/sys/dev/fdt/fdt_i2c.c:1.5
--- src/sys/dev/fdt/fdt_i2c.c:1.4 Sun Jul 1 18:16:40 2018
+++ src/sys/dev/fdt/fdt_i2c.c Wed Sep 26 20:03:36 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_i2c.c,v 1.4 2018/07/01 18:16:40 jmcneill Exp $ */
+/* $NetBSD: fdt_i2c.c,v 1.5 2018/09/26 20:03:36 jakllsch 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.4 2018/07/01 18:16:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_i2c.c,v 1.5 2018/09/26 20:03:36 jakllsch Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -93,7 +93,7 @@ device_t
fdtbus_attach_i2cbus(device_t dev, int phandle, i2c_tag_t tag, cfprint_t print)
{
struct i2cbus_attach_args iba;
- prop_dictionary_t devs;
+ prop_dictionary_t devs, props;
u_int address_cells;
devs = prop_dictionary_create();
@@ -109,5 +109,8 @@ fdtbus_attach_i2cbus(device_t dev, int p
prop_object_retain(iba.iba_child_devices);
prop_object_release(devs);
+ props = device_properties(dev);
+ prop_dictionary_set_bool(props, "i2c-indirect-config", false);
+
return config_found_ia(dev, "i2cbus", &iba, print);
}
Index: src/sys/dev/ofw/ofw_subr.c
diff -u src/sys/dev/ofw/ofw_subr.c:1.32 src/sys/dev/ofw/ofw_subr.c:1.33
--- src/sys/dev/ofw/ofw_subr.c:1.32 Thu Aug 23 13:24:44 2018
+++ src/sys/dev/ofw/ofw_subr.c Wed Sep 26 20:03:36 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_subr.c,v 1.32 2018/08/23 13:24:44 jmcneill Exp $ */
+/* $NetBSD: ofw_subr.c,v 1.33 2018/09/26 20:03:36 jakllsch Exp $ */
/*
* Copyright 1998
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.32 2018/08/23 13:24:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.33 2018/09/26 20:03:36 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -501,8 +501,6 @@ of_enter_i2c_devs(prop_dictionary_t prop
prop_dictionary_set(props, "i2c-child-devices", array);
prop_object_release(array);
}
-
- prop_dictionary_set_bool(props, "i2c-indirect-config", false);
}
/*