fwnode_get_next_child_node(9)
β¨ fwnode_get_next_child_node β¨
okay bestie, gather round, because this lil kernel API manual page (fwnode_get_next_child_node, from the Kernel API Manual, no cap) is literally about walking down the family tree of firmware nodes and finding the next child. it's giving "one node at a time, main character energy" π¦
πΈ NAME πΈ
fwnode_get_next_child_node β return the next child node handle for a node π
π SYNOPSIS π
struct fwnode_handle * fwnode_get_next_child_node (const struct fwnode_handle *fwnode , struct fwnode_handle *child );
like, that's the whole signature, hun. fwnode is const, child isn't, and you get a struct fwnode_handle * back. slay π
π ARGUMENTS π
fwnodeβ the firmware node you're likeβ¦ finding the next child node for. your starting point, your home base, the parent in question π«Άchildβ a handle to one of the node's child nodes, or aNULLhandle. yes,NULLis literally allowed here, it's fine, breathe π
π₯ DESCRIPTION π₯
so here's the tea, and it's a big one, so listen up: the caller is responsible for calling fwnode_handle_put on the returned fwnode pointer. that ref is yours now. you own it. handle it. put it back when you're done or it's a leak and we don't do leaks in this house π
and that's not even all of it β this function also puts a reference to child unconditionally. like, no vibe check, no "are you sure", it just does it. every time. periodt. so don't be out here holding onto child afterwards assuming you still got a ref, because bestieβ¦ you do not π
β οΈ fr fr, both of those ref-counting details are the whole ballgame.fwnode_handle_puton the returned pointer = your job. the unconditional put onchild= already happened by the time you get control back. iykyk.
π SEE ALSO π
the kernel file lives at ./drivers/base/property.c and honestly the whole friend group is here, so let's do the roll call π€β
device_property_present(9), fwnode_property_present(9), device_property_read_bool(9), fwnode_property_read_bool(9), device_property_read_u8_array(9), device_property_read_u16_array(9), device_property_read_u32_array(9), device_property_read_u64_array(9), device_property_read_string_array(9), device_property_read_string(9), device_property_match_string(9), fwnode_property_read_u8_array(9), fwnode_property_read_u16_array(9), fwnode_property_read_u32_array(9), fwnode_property_read_u64_array(9), fwnode_property_read_string_array(9), fwnode_property_read_string(9), fwnode_property_match_string(9), fwnode_property_match_property_string(9), fwnode_property_get_reference_args(9), fwnode_find_reference(9), fwnode_get_name(9), fwnode_get_name_prefix(9), fwnode_name_eq(9), fwnode_get_parent(9), fwnode_get_next_parent(9), fwnode_count_parents(9), fwnode_get_nth_parent(9), fwnode_get_next_available_child_node(9), device_get_next_child_node(9), fwnode_get_named_child_node(9), device_get_named_child_node(9), fwnode_handle_get(9), fwnode_device_is_available(9), fwnode_get_child_node_count(9), fwnode_get_named_child_node_count(9), fwnode_get_phy_mode(9), device_get_phy_mode(9), fwnode_iomap(9), fwnode_irq_get(9), fwnode_irq_get_byname(9), fwnode_graph_get_next_endpoint(9), fwnode_graph_get_port_parent(9), fwnode_graph_get_remote_port_parent(9), fwnode_graph_get_remote_port(9), fwnode_graph_get_remote_endpoint(9), fwnode_graph_get_endpoint_by_id(9), fwnode_graph_get_endpoint_count(9), fwnode_graph_parse_endpoint(9), fwnode_connection_find_match(9), fwnode_connection_find_matches(9)
like, every single one. no skips. we ate and left no crumbs π
and that's the page!! mwah π this one's from ./drivers/base, dated October 2026, and it's fwnode_get_next_child_node(9) all day long β go forth and put your handles, icon πβ¨
π¦ 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