diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2009-01-06 17:23:37 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2009-01-06 17:23:37 +0000 |
commit | 4d7a485a5266b1987891fc4cd20902fc96d1a88a (patch) | |
tree | 6451bf655643fdb49d8fd50ea77f0f8149f7b436 /sys/dev/iicbus | |
parent | 2fd77860b9c036749ea1b22a224818e1a757a1e3 (diff) | |
download | FreeBSD-src-4d7a485a5266b1987891fc4cd20902fc96d1a88a.zip FreeBSD-src-4d7a485a5266b1987891fc4cd20902fc96d1a88a.tar.gz |
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
Diffstat (limited to 'sys/dev/iicbus')
-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 fe4abb8..3875307 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 a2c4577..1169271 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 29a27b1..93c03ad 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 1c48f71..2457a9f 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 6d3cb63..685dfaf 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 de64874..e926984 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 196735c..a442a23 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 |