Enumerable I2C busses
Nathan Whitehorn
nwhitehorn at freebsd.org
Sun Nov 23 09:39:16 PST 2008
On Apple's PowerPC systems, the firmware device tree helpfully
enumerates the system's I2C busses. Marco Trillo has recently written a
driver for one of the system's I2C controllers in order to support the
attached audio codecs, and I'm trying to figure out the best way to
import it.
The current I2C bus mechanism does not support the bus adding its own
children and instead relies on hints or other out-of-band information
for device attachment. It would be nice to do something like what the
firmware-assisted PCI bus drivers do (ofw_pci, for instance): hijack
child enumeration from the MI layer and attach information from the
firmware.
However, since all current I2C drivers' probe() routines return 0, I
can't simply add the firmware devices, because as soon as the probe()
methods of the existing drivers are called, they will take over all the
devices on the bus.
What is the best way to handle this?
-Nathan
More information about the freebsd-arch
mailing list