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

Timur Tabi timur at freescale.com
Fri Jun 6 05:16:41 EST 2008


Grant Likely 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.

Do aliases work in reverse?  That is, if I have a pointer to a device node, can
I look up its alias directly?  Or do I have to scan the aliases node and do a
comparison of each phandle, one at a time, until I find a match?  And when I
find a match, will I need to do sscanf() in order to extract the actual index
value from the property?

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Linuxppc-dev mailing list