fwnode_get_next_parent(9)
π fwnode_get_next_parent β Kernel API Manual β¨
Okay bestie, gather round, because this one is a little function with a big personality. It lives in the Kernel API Manual, and it's basically the "go up one level" button for firmware nodes. Family tree energy. π³
πΈ NAME πΈ
fwnode_get_next_parent β literally just: iterate to the node's parent. That's it. That's the whole vibe check. π
β¨ SYNOPSIS β¨
struct fwnode_handle * fwnode_get_next_parent (struct fwnode_handle
*fwnode );
π ARGUMENTS π
fwnodeβ the firmware node whose parent you're trying to retrieve. Like, "who's your mom", but for kernel objects. π«Ά
π¦ DESCRIPTION π¦
So here's the tea: this is like fwnode_get_parent, except β and this is the iconic part β it drops the refcount on the passed node. Dropping the refcount is what makes it suitable for iterating through a node's parents. It's giving "one-way door, no looking back" energy. πͺβ¨
β οΈ Also, heads up: the caller is responsible for callingfwnode_handle_puton the returnedfwnodepointer. And note that this function also puts a reference tofwnodeunconditionally. Unconditionally! No cap. So don't be out here thinking you still own that reference after you call this. π
π₯ RETURN π₯
You get the parent firmware node of the given node if possible β or NULL if no parent was available. Simple as that. If there's no parent, bestie, there's no parent. π
π SEE ALSO π
This function rolls with a huge friend group, so let's give everyone their shoutout. Kernel file ./drivers/base/property.c β that's where the magic lives, iykyk. π
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_count_parents(9)fwnode_get_nth_parent(9)fwnode_get_next_child_node(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)wnodeβ oops, no, fr fr it'sfwnode_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)
π That's the whole page, bestie! Stay hydrated, put your refcounts where they belong, and remember: this lil doc came to you courtesy of ./drivers/base, dated October 2026, in the Kernel API Manual. Slay. π
β¨π
π¦ 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