OF_CHILD(9) FreeBSD Kernel Developer's Manual OF_CHILD(9)

NAME

OF_child, OF_parent, OF_peernavigate device tree

SYNOPSIS

#include <dev/ofw/ofw_bus.h>
#include <dev/ofw/ofw_bus_subr.h>
phandle_t
OF_child(phandle_t node);
phandle_t
OF_parent(phandle_t node);
phandle_t
OF_peer(phandle_t node);

DESCRIPTION

OF_child() returns phandle value of the first child of the node. 0 if there are no child nodes.
OF_parent() returns phandle for the parent of the node 0 if node is the root node.
OF_peer() returns phandle value of the next sibling of the node. 0 if there is no sibling node.

EXAMPLES

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

SEE ALSO

OF_finddevice(9)

AUTHORS

This manual page was written by Oleksandr Tymoshenko <gonzo@FreeBSD.org>.
February 25, 2018 FreeBSD 12.0-CURRENT