[PATCH 4/4] powerpc: Call of_register_i2c_devices() for fsl-i2c.

Kumar Gala galak at kernel.crashing.org
Sat Dec 9 07:34:59 EST 2006


On Dec 8, 2006, at 12:38 PM, Scott Wood wrote:

> Kumar Gala wrote:
>> You are assuming the bus number is the same as our index. This  
>> may  not be true.
>
> http://ozlabs.org/pipermail/linuxppc-dev/2006-December/028924.html
>
> The above patch sets the I2C ID to the index, so as long as there  
> are no non-SOC i2c busses with static bus numbers, it'll work.
>
> If there are non-SOC i2c busses (such as on a PCI card) that claim  
> a conflicting static bus ID, there'll be problems -- but that  
> problem isn't powerpc or device-tree specific.

True, but I think we can do better.

> A more robust solution would be to allow each i2c adapter driver to  
> specify an i2c_board_info list when registering itself.  The  
> adapter driver could then get this list from platform code (if  
> appropriate; a PCI card that uses i2c internally would simply have  
> its own list), without having to deal with system-wide bus IDs.

What about doing the of_register_i2c_devices in the fsl-i2c driver  
itself.  Than it knows what bus number its been assigned.

- k



More information about the Linuxppc-dev mailing list