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
This commit is contained in:
nwhitehorn 2009-01-06 17:23:37 +00:00
parent 2fd77860b9
commit 4d7a485a52
7 changed files with 10 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);
}
/*

View File

@ -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

View File

@ -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

View File

@ -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