[PATCH 2/2] i2c: Add devtree-aware iic support for PPC4xx

Scott Wood scottwood at freescale.com
Tue Oct 16 04:53:40 EST 2007


On Mon, Oct 15, 2007 at 10:57:48AM -0600, Grant Likely wrote:
> Segher is recommending that we use an aliases node as per the open
> firmware example for this.  I think in this case it would look
> something like this (but I'm not the expert):
> 
> aliases {
>      IIC0 = "/path/to/bus/iic at 0x2000";
>      IIC1 = "/path/to/bus/iic at 0x2000";
> };

I think this is overly complicated; something like linux,i2c-index in the
i2c adapter node would be simpler.

Though, I don't see what the problem with the original approach is, as long
as the numbers are chosen in the same way when registering i2c clients based
on the children of the adapter node.  There's no concept in the hardware
itself of a bus number.

-Scott



More information about the Linuxppc-dev mailing list