Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Set "i2c-indirect-config" to false in the right plac...
details: https://anonhg.NetBSD.org/src/rev/7d008d633c38
branches: trunk
changeset: 993721:7d008d633c38
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Sep 26 20:03:36 2018 +0000
description:
Set "i2c-indirect-config" to false in the right place so that iic(4)
better behaves itself.
diffstat:
sys/dev/fdt/fdt_i2c.c | 9 ++++++---
sys/dev/ofw/ofw_subr.c | 6 ++----
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (63 lines):
diff -r 292ea2baa859 -r 7d008d633c38 sys/dev/fdt/fdt_i2c.c
--- a/sys/dev/fdt/fdt_i2c.c Wed Sep 26 19:06:33 2018 +0000
+++ b/sys/dev/fdt/fdt_i2c.c Wed Sep 26 20:03:36 2018 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
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 @@
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);
}
diff -r 292ea2baa859 -r 7d008d633c38 sys/dev/ofw/ofw_subr.c
--- a/sys/dev/ofw/ofw_subr.c Wed Sep 26 19:06:33 2018 +0000
+++ b/sys/dev/ofw/ofw_subr.c Wed Sep 26 20:03:36 2018 +0000
@@ -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 @@
prop_dictionary_set(props, "i2c-child-devices", array);
prop_object_release(array);
}
-
- prop_dictionary_set_bool(props, "i2c-indirect-config", false);
}
/*
Home |
Main Index |
Thread Index |
Old Index