Re: "cell-index" vs. "index" vs. no index in I2C device nodes
From: Josh Boyer <hidden>
Date: 2008-06-06 00:00:15
On Thu, 05 Jun 2008 10:50:20 -0500 Timur Tabi [off-list ref] wrote:
Jochen Friedrich wrote:quoted
Hi Timur,quoted
In situations where it doesn't matter which I2C bus is #1 and which one is #2, then I think the code should just initialize idx based on the order the nodes are found in the tree. In situations where it does matter, then we should use cell-index.that's what I did in i2c-cpm, as well. However, here I use the property "linux,i2c-index" instead (see http://patchwork.ozlabs.org/linuxppc/patch?id=18603).Well, I just don't see the point of having two different properties that say the same thing. I'm not an IEE 1275 purist, so I don't think we should be hampered by old node definitions. I especially don't like having a property specifically for indexing I2C nodes that can't be used to enumerate other nodes.
It's not about purity. It's about overloading something that has existing semantics just because you have one usecase that you _think_ needs it. If everyone did that, this whole device tree concept is going to just be one big cluster f*ck. Get over it, fix your driver to use the device model and aliases propertly, and move on. josh