Subject: Re: "cell-index" vs. "index" vs. no index in I2C device nodes

From: Timur Tabi <[email-masked]>
Date: Thu, 05 Jun 2008 14:16:41 -0500

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