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

Scott Wood scottwood at freescale.com
Sat Dec 9 05:38:37 EST 2006


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.

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.

-Scott



More information about the Linuxppc-dev mailing list