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

Grant Likely grant.likely at secretlab.ca
Fri Jun 6 01:53:33 EST 2008


On Thu, Jun 5, 2008 at 9:52 AM, Jochen Friedrich <jochen at scram.de> wrote:
> Hi Grant,
>
>> if you need explicit indexing then use an alias.  My opinion however
>> is that explicit indexing is unnecessary and is just an artifact of
>> current i2c subsystem internals.  There is already enough information
>> in the device tree to match i2c devices with i2c busses without
>> resorting to indexes.
>
> True. However, there are currently drivers which need platform data for
> its initialisation (like drivers/gpio/pca953x.c). Unless these drivers
> are rewritten, they can't be loaded just by parsing the device tree, so
> they must be loaded from platform init code and here the adapter index
> is needed to attach the driver.

... which means that platform code is responsible to figure it out.
Don't encode it into the device tree.

Besides, this is just a binding.  I see absolutely no problem adding
probe code to the bindings to extract data from the device tree.

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.



More information about the Linuxppc-dev mailing list