diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2009-01-06 17:23:37 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2009-01-06 17:23:37 +0000 |
commit | 789c4b9d0838adbee43474bc96a77a06e15180c7 (patch) | |
tree | 6451bf655643fdb49d8fd50ea77f0f8149f7b436 | |
parent | fa600cb9bacfd48ef3096355fb33099532e481d7 (diff) | |
download | src-789c4b9d0838adbee43474bc96a77a06e15180c7.tar.gz src-789c4b9d0838adbee43474bc96a77a06e15180c7.zip |
Change the way I2C bus attachment works to allow firmware-assisted bus
subclasses as are available with PCI. Changes I2C device drivers without
real probe logic to return BUS_PROBE_NOWILDWARD to avoid interference with
firmware bus enumeration, and reduces the probe priority of the iicbus
base driver to allow subclass attachment at higher priority.
Discussed on: freebsd-arch
Notes
Notes:
svn path=/head/; revision=186833
-rw-r--r-- | sys/dev/iicbus/ad7418.c | 2 | ||||
-rw-r--r-- | sys/dev/iicbus/ds1672.c | 2 | ||||
-rw-r--r-- | sys/dev/iicbus/icee.c | 2 | ||||
-rw-r--r-- | sys/dev/iicbus/if_ic.c | 2 | ||||
-rw-r--r-- | sys/dev/iicbus/iic.c | 4 | ||||
-rw-r--r-- | sys/dev/iicbus/iicbus.c | 4 | ||||
-rw-r--r-- | sys/dev/iicbus/iicsmb.c | 2 |
7 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/iicbus/ad7418.c b/sys/dev/iicbus/ad7418.c index fe4abb881cc6..38753077bd67 100644 --- a/sys/dev/iicbus/ad7418.c +++ b/sys/dev/iicbus/ad7418.c @@ -82,7 +82,7 @@ ad7418_probe(device_t dev) { /* XXX really probe? */ device_set_desc(dev, "Analog Devices AD7418 ADC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int diff --git a/sys/dev/iicbus/ds1672.c b/sys/dev/iicbus/ds1672.c index a2c45777c794..116927105ff2 100644 --- a/sys/dev/iicbus/ds1672.c +++ b/sys/dev/iicbus/ds1672.c @@ -61,7 +61,7 @@ ds1672_probe(device_t dev) { /* XXX really probe? */ device_set_desc(dev, "Dallas Semiconductor DS1672 RTC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int diff --git a/sys/dev/iicbus/icee.c b/sys/dev/iicbus/icee.c index 29a27b1bcf05..93c03ad3bbb0 100644 --- a/sys/dev/iicbus/icee.c +++ b/sys/dev/iicbus/icee.c @@ -86,7 +86,7 @@ icee_probe(device_t dev) { /* XXX really probe? -- not until we know the size... */ device_set_desc(dev, "I2C EEPROM"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int diff --git a/sys/dev/iicbus/if_ic.c b/sys/dev/iicbus/if_ic.c index 1c48f711452b..2457a9f62dcf 100644 --- a/sys/dev/iicbus/if_ic.c +++ b/sys/dev/iicbus/if_ic.c @@ -153,7 +153,7 @@ ic_alloc_buffers(struct ic_softc *sc, int mtu) static int icprobe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } /* diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c index 6d3cb63896f5..685dfaf27f6c 100644 --- a/sys/dev/iicbus/iic.c +++ b/sys/dev/iicbus/iic.c @@ -110,14 +110,14 @@ iic_identify(driver_t *driver, device_t parent) { if (device_find_child(parent, "iic", -1) == NULL) - BUS_ADD_CHILD(parent, 0, "iic", -1); + BUS_ADD_CHILD(parent, 0, "iic", 0); } static int iic_probe(device_t dev) { device_set_desc(dev, "I2C generic I/O"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int diff --git a/sys/dev/iicbus/iicbus.c b/sys/dev/iicbus/iicbus.c index de6487400b4f..e926984d3c7c 100644 --- a/sys/dev/iicbus/iicbus.c +++ b/sys/dev/iicbus/iicbus.c @@ -53,7 +53,9 @@ iicbus_probe(device_t dev) { device_set_desc(dev, "Philips I2C bus"); - return (0); + + /* Allow other subclasses to override this driver. */ + return (-1000); } #if SCAN_IICBUS diff --git a/sys/dev/iicbus/iicsmb.c b/sys/dev/iicbus/iicsmb.c index 196735c58ace..a442a23577a6 100644 --- a/sys/dev/iicbus/iicsmb.c +++ b/sys/dev/iicbus/iicsmb.c @@ -149,7 +149,7 @@ static int iicsmb_probe(device_t dev) { device_set_desc(dev, "SMBus over I2C bridge"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int |