"cell-index" vs. "index" vs. no index in I2C device nodes
Timur Tabi
timur at freescale.com
Fri Jun 6 02:18:38 EST 2008
Grant Likely wrote:
> multifunction at 0 {
> #size-cells = <1>;
> #address-cells = <1>;
> ranges = <0 0xe00000000 0x1000>;
> i2c at 0 {
> cell-index = <0>;
> regs = <0 0x100>;
> }
> i2c at 100 {
> cell-index = <1>;
> regs = <0x100 0x100>;
> }
> }
> multifunction at 1 {
> #size-cells = <1>;
> #address-cells = <1>;
> ranges = <0 0xe10000000 0x1000>;
> i2c at 0 {
> cell-index = <0>;
> regs = <0 0x100>;
> }
> i2c at 100 {
> cell-index = <1>;
> regs = <0x100 0x100>;
> }
> }
What resources are being shared in this example? Each I2C device has its own
address ranges. I don't see how cell-index provides any useful info here.
> cell-index must *not* be repurposed as a system level index.
It's a little late for that. I'm okay with coming up with a new property to
provide system-level indexing, but it needs to be the same property name for
each type of device. I don't want linux,i2c-index and linux,dma-index and
linux,ssi-index, etc. I also don't understand why we need the linux, prefix,
since device enumeration is not specific to Linux.
--
Timur Tabi
Linux kernel developer at Freescale
More information about the Linuxppc-dev
mailing list