Re: Query on device tree phandles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Carlo,

On 15-05-26 16:26:45, Carlo Caione wrote:
> On Mon, May 25, 2015 at 11:02 AM,  <victorascroft@xxxxxxxxx> wrote:
> > Hello,
> >
> > I have a query related to device tree. If I have three nodes as below
> >
> > node1: node1@addr1 {
> >        compatible ="name1", "syscon";
> >        }
> >
> > node2: node1@addr2 {
> >        compatible ="name2", "syscon";
> >        }
> >
> > node3: node1@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

Thanks. This worked out. Is it also possible to read a clock reference for
enabling a clock?

node1 : node@addr1 {
      compatible = "name1";
      node2-phandle = <&node2>;
      }

node2 : node@addr2 {
      compatible = "name2";
      clocks = <&clks DEVICE_CLK_PER>;
      }

In the driver of node 1 I can get node2 and map it. Would it be possible
to get the clock reference for enabling the clock. Basically node2 does
not have the driver and node 1 would require access to node 2 peripheral.

Regards,
Victor.


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux