Query on device tree phandles

Carlo Caione carlo at caione.org
Tue May 26 10:26:45 EDT 2015


On Mon, May 25, 2015 at 11:02 AM,  <victorascroft at gmail.com> wrote:
> Hello,
>
> I have a query related to device tree. If I have three nodes as below
>
> node1: node1 at addr1 {
>        compatible ="name1", "syscon";
>        }
>
> node2: node1 at addr2 {
>        compatible ="name2", "syscon";
>        }
>
> node3: node1 at addr3 {
>        compatible ="name3", "syscon";
>        }
>
>
> At the top soc node, I define phandles as follows
>
> node-phandle1 = <&node1 0x10>
> node-phandle2 = <&node2 0x20>
> node-phandle3 = <&node3 0x30>
>
> How can I read the values of 0x10, 0x20 and 0x30 while using the node-phandlex
> property? Is it possible using one of the of_* functions?
>
> The driver binds to one of the syscon nodes above lets say node3.

http://lxr.free-electrons.com/source/drivers/of/base.c#L1597

-- 
Carlo Caione



More information about the Kernelnewbies mailing list