Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/i2c add rescan support
details: https://anonhg.NetBSD.org/src/rev/aecf07260227
branches: trunk
changeset: 767812:aecf07260227
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Jul 31 15:58:25 2011 +0000
description:
add rescan support
diffstat:
sys/dev/i2c/i2c.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r a69712675e36 -r aecf07260227 sys/dev/i2c/i2c.c
--- a/sys/dev/i2c/i2c.c Sun Jul 31 15:39:28 2011 +0000
+++ b/sys/dev/i2c/i2c.c Sun Jul 31 15:58:25 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i2c.c,v 1.25 2010/03/01 17:35:21 njoly Exp $ */
+/* $NetBSD: i2c.c,v 1.26 2011/07/31 15:58:25 jmcneill Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.25 2010/03/01 17:35:21 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.26 2011/07/31 15:58:25 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -119,6 +119,13 @@
}
static int
+iic_rescan(device_t self, const char *ifattr, const int *locators)
+{
+ config_search_ia(iic_search, self, ifattr, NULL);
+ return 0;
+}
+
+static int
iic_match(device_t parent, cfdata_t cf, void *aux)
{
@@ -275,7 +282,7 @@
* Attach all i2c devices described in the kernel
* configuration file.
*/
- config_search_ia(iic_search, self, "iic", NULL);
+ iic_rescan(self, "iic", NULL);
}
}
@@ -429,5 +436,5 @@
}
-CFATTACH_DECL_NEW(iic, sizeof(struct iic_softc),
- iic_match, iic_attach, NULL, NULL);
+CFATTACH_DECL2_NEW(iic, sizeof(struct iic_softc),
+ iic_match, iic_attach, NULL, NULL, iic_rescan, NULL);
Home |
Main Index |
Thread Index |
Old Index