On Wed, 4 Jun 2008 22:54:32 -0400 Sean MacLennan <[EMAIL PROTECTED]> wrote:
> On Wed, 4 Jun 2008 21:19:42 -0500 > "Josh Boyer" <[EMAIL PROTECTED]> wrote: > > > From a device tree perspective, index and cell-index are both > > incorrect. The IIC macros don't share register blocks with anything, > > are enumerated as unique instances per macro in the device tree, and > > should be able to be distinguished by "regs" and/or unit address. > > So say I have an i2c bus and I want to call i2c_get_adapter. > Would I have to know the register address of the i2c bus to lookup the > adapter? > > Or would they have aliases like serial ports do? I have no idea. But if you look at the actual driver code, the only thing the current "index" property is used for is to fill the idx member of the ibm_iic_private structure. I'm not proposing we remove that. I'm just proposing that it can be derived from something other than an "index" property. Fill it in using a static integer that gets incremented for each new device found. It's not like we have an indeterminate probe order, or these IIC macros can be hot-plugged. josh _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev