On 11/6/07, Grant Likely <[EMAIL PROTECTED]> wrote: > On 11/6/07, Jean Delvare <[EMAIL PROTECTED]> wrote: > > Hi Scott, > > > > On Tue, 06 Nov 2007 11:36:23 -0600, Scott Wood wrote: > > > Jean Delvare wrote: > > > >>>> We might as well just use i2c_new_device() instead of messing around > > > >>>> with bus numbers. Note that this is technically no longer platform > > > >>>> code, so it's harder to justify claiming the static numberspace. > > > >>> I was allowing control of the bus number with "cell-index" and > > > >>> i2c_add_numbered_adapter(). > > > >>> Should I get rid of this and switch to i2c_add_adapter()? > > > >> Yes. > > > > > > > > No! If you don't call i2c_add_numbered_adapter() then new-style i2c > > > > clients will never work on your i2c adapter. > > > > > > I thought that was what i2c_new_device() was for? > > > > Sorry, I've not been completely clear. Yes, you can use > > i2c_new_device() on an adapter that has been added with > > i2c_add_adapter(). However, this requires that you have a reference to > > that i2c_adapter, which is usually not the case with system-wide I2C > > buses. Embedded platforms would rather use i2c_add_numbered_adapter(), > > give a list of chips to i2c_register_board_info() and let i2c-core > > instantiate them. i2c_new_device was primarily meant for multimedia > > adapters. > > *Some* embedded platforms would rather use i2c_add_numbered_adapter(). :-) > > On powerpc, and other platforms which have a device tree, we don't
Specifically; an OF style device tree. :-) g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev