logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

OF_child, OF_parent, OF_peer — navigate device tree

Authors

       This manual page was written by Oleksandr Tymoshenko <gonzo@FreeBSD.org>.

Debian                                            April 9, 2018                                      OF_CHILD(9)

Description

OF_child()  returns  the  phandle value of the first child of the node.  Zero is returned if there are no
       child nodes.

       OF_parent() returns the phandle for the parent of the node.  Zero is returned if node is the root node.

       OF_peer() returns the phandle value of the next sibling of the node.  Zero is returned  if  there  is  no
       sibling node.

Examples

       phandle_t node, child;
        ...
       for (child = OF_child(node); child != 0; child = OF_peer(child) {
               ...
       }

Name

       OF_child, OF_parent, OF_peer — navigate device tree

See Also

OF_finddevice(9)

Synopsis

#include<dev/ofw/ofw_bus.h>#include<dev/ofw/ofw_bus_subr.h>phandle_tOF_child(phandle_tnode);

       phandle_tOF_parent(phandle_tnode);

       phandle_tOF_peer(phandle_tnode);

See Also