[i2c] Identifying I2C busses
David Brownell
david-b at pacbell.net
Fri Mar 9 05:00:14 CET 2007
On Wednesday 07 March 2007 12:42 pm, David Brownell wrote:
> But again, I may decide I like your
> notion of device struct as handle, at which point this issue vanishes too.
OK, unfortunately that idea can't work. I should have remembered:
/sys/devices/pci0000:00/0000:00:01.1> ls
broken_parity_status device i2c-1 msi_bus resource5 uevent
bus driver irq power subsystem vendor
class enable local_cpus resource subsystem_device
config i2c-0 modalias resource4 subsystem_vendor
/sys/devices/pci0000:00/0000:00:01.1>
Note: both i2c-0 and i2c-1 are parented by the same PCI device.
On embedded systems there's essentially always a one-to-one mapping between
driver model devices and I2C busses. But that's not true on many common
PCI based systems ... like the one above, and various video adapters.
Unless that mapping is one-to-one, there's no way to use physical device
nodes as the persistent identifiers for I2C busses. So, when I refresh
that patch it's going to still use bus numbers as handles.
- Dave
More information about the i2c
mailing list