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

Sean MacLennan smaclennan at pikatech.com
Fri Jun 6 08:45:09 EST 2008


On Thu, 5 Jun 2008 13:14:00 -0600
"Grant Likely" <grant.likely at secretlab.ca> wrote:

> No; use an alias in the aliases node.  That is what aliases is
> designed for.  Something like 'index' is a reinvention of the wheel.

If we really want to get rid of the index, I like the alias method. I
mainly write drivers, so I don't know register addresses. I just read
the spec and it says device A is on i2c bus 2. That is why I went with
the index. Calling get_i2c_apapter(2) makes sense.

However, calling get_i2c_adapter("IIC2"), just as a made up example,
makes just as much sense.

Cheers,
   Sean



More information about the Linuxppc-dev mailing list