tail head cat sleep
QR code linking to this page

Manual Pages  — OF_CHILD

NAME

OF_child, OF_parent, OF_peer – navigate device tree

CONTENTS

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 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) {
        ...
}

SEE ALSO

OF_finddevice(9)

AUTHORS

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

OF_CHILD (9) April 9, 2018

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
— Charles Babbage