"cell-index" vs. "index" vs. no index in I2C device nodes

Benjamin Herrenschmidt benh at kernel.crashing.org
Fri Jun 6 14:13:43 EST 2008


On Wed, 2008-06-04 at 10:43 -0500, Scott Wood wrote:
> > I just posted a patch for the FSL I2C driver to check for cell-index.  I'm under
> > the impression that cell-index is the standard for enumerating devices in the
> > device tree.
> 
> No, it's the standard for correlating devices with portions of a shared
> register block elsewhere.  Your use in the I2C node is merely a hack to
> deal with Linux wanting to deal with indices rather than pointers,
> combined with a lack of a decent way to look up a device struct from the
> device node.

Totally agreed. cell-index should -only- be about correlating a given
device in an ASIC with some shared register (an example coming to mind
is clock control registers with one bit per cell) etc...

For the rest, well, use aliases :-)

Ben.





More information about the Linuxppc-dev mailing list