Thread (74 messages) 74 messages, 12 authors, 2008-06-27

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

From: Josh Boyer <hidden>
Date: 2008-06-05 02:19:58

On Wed, 4 Jun 2008 10:43:51 -0500
Scott Wood [off-list ref] wrote:
On Wed, Jun 04, 2008 at 10:24:15AM -0500, Timur Tabi wrote:
quoted
Stefan Roese wrote:
quoted
I'm wondering what is currently recommended in the I2C device tree no=
des? The=20
quoted
quoted
current IBM I2C driver (i2c-ibm_iic.c) checks "index" and most FSL dt=
s files=20
quoted
quoted
use "cell-index". Some 4xx dts files implement "cell-index" some have=
 no=20
quoted
quoted
index at all.
=20
So what should be used here. Please advise and I'll prepare a patch f=
or it.
quoted
=20
I just posted a patch for the FSL I2C driver to check for cell-index.  =
I'm under
quoted
the impression that cell-index is the standard for enumerating devices =
in the
quoted
device tree.
=20
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.
So if possible, I'd like to eliminate the *index stuff all together
from the 4xx driver.  The private data structure contains an idx
parameter, but this can be populated based on probe order or something.

=46rom 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.

Does anyone disagree with that?

josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help