[PATCH] powerpc: add of_find_next_property and of_get_aliased_index

Timur Tabi timur at freescale.com
Thu Jun 26 06:27:05 EST 2008


Segher Boessenkool wrote:

> It returns 2 for both "i2c-1" and "i2c-2".

Well, I'm assuming that the alias property names will follow the current
convention of xxxxnn where xxxx is a name and nn is a number.  No dashes or
other punctuation.

> Also, alias names do not have any significance in general, they are
> just handy shortcut names for humans to use; it would be better not
> to overload this.  What do you want to use this for?

As an alternative to cell-index or device-id for enumerating devices.  The
consensus from the '"cell-index" vs. "index" vs. no index in I2C device nodes'
thread is that aliases are to be used to enumerate devices.

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Linuxppc-dev mailing list