Subject: Re: [RFC] Non-numbered ibm iic driver

From: Grant Likely <[email-masked]>
Date: Sat, 28 Jun 2008 22:31:11 -0600

On Sat, Jun 28, 2008 at 11:43:39PM -0400, Sean MacLennan wrote:
> On Sat, 28 Jun 2008 23:25:05 -0400
> "Jon Smirl" <[email-masked]> wrote:
> 
> > On 6/28/08, Sean MacLennan <[email-masked]> wrote:
> > > This is a patch to the ibm iic driver that uses the non-numbered
> > >  i2c call and therefore does not need an index. Instead, it
> > > registers the ibm iic, then walks all the child nodes and adds
> > > them. This is required for new style drivers, old style drivers
> > > "just work".
> > 
> > Check out the code in drivers/of/of_i2c.c. Can you use it instead?
> 
> Sure can. The for loop can be replaced with:
> 
> 	of_register_i2c_devices(adap, np);
> 
> I have tested it and it works. I guess it makes sense to put of_i2c.c
> under drivers/of, but if it had been under drivers/i2c, I would have
> noticed it ;)
> 
> But is this the way we want to go? I personally like it. It gets rid of
> the index and gets rid of the i2c_register_board_info() from the
> platform code.

Oops, forgot to include the list on my first reply...

Yes, this is the way to go.  I've got a patch that does the same thing
for SPI busses which I need to post for 2nd review.

g.