of_graph_get_next_endpoint(9)
π of_graph_get_next_endpoint(9) β get next endpoint node π
Okay so bestie, listen up, this is from the Kernel API Manual and it's literally about walking the device tree graph, one endpoint at a time. It's giving "traverse the graph, queen" energy and I'm obsessed. β¨
πΈ SYNOPSIS πΈ
struct device_node * of_graph_get_next_endpoint (const struct device_node *parent , struct device_node *prev );
π¦ ARGUMENTS π¦
parentβ pointer to the parent device node π (this is the node you're poking around in, iykyk)prevβ previous endpoint node, orNULLto get the first one π (passNULLwhen you're starting fresh, no cap)
π RETURN π
An 'endpoint' node pointer with refcount incremented. And the way that it also decrements the refcount of the passed prev node β periodt, that's the whole deal. π
Not me reminding you to handle your refcounts properly, bestie β this function does the increment/decrement dance for you, but you still gotta be responsible with the pointer it hands back. π«Ά
π SEE ALSO π
Kernel file ./drivers/of/property.c β and literally the whole squad of property/graph functions are tagged along, so here's the full list, no skips:
of_property_read_bool(9)of_graph_is_present(9)of_property_count_elems_of_size(9)of_find_property_value_of_size(9)of_property_read_u8_index(9)of_property_read_u16_index(9)of_property_read_u32_index(9)of_property_read_u64_index(9)of_property_read_variable_u8_array(9)of_property_read_variable_u16_array(9)of_property_read_variable_u32_array(9)of_property_read_u64(9)of_property_read_variable_u64_array(9)of_property_read_string(9)of_property_match_string(9)of_property_read_string_helper(9)of_graph_parse_endpoint(9)of_graph_get_port_by_id(9)of_graph_get_next_port(9)of_graph_get_next_port_endpoint(9)of_graph_get_endpoint_by_regs(9)of_graph_get_remote_endpoint(9)of_graph_get_port_parent(9)of_graph_get_remote_port_parent(9)of_graph_get_remote_port(9)of_graph_get_endpoint_count(9)of_graph_get_port_count(9)of_graph_get_remote_node(9)parse_prop_cells(9)parse_suffix_prop_cells(9)struct supplier_bindings(9)of_link_property(9)
β¨ And that's the whole page, bestie β from ./drivers/of, October 2026, version-tagged as of_graph_get_next_endpoint(9). Go forth and slay those graph traversals! ππ₯
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms