fwnode_grap...dpoint_by_id(9)
π fwnode_grap...dpoint_by_id(9) π
okay so bestie, welcome to the Kernel API Manual β yes that's the whole manual name, we're in the big leagues now π β and today's main character is fwnode_graph_get_endpoint_by_id. Let's get into it, no cap.
β¨ NAME β¨
fwnode_graph_get_endpoint_by_id β literally just "get endpoint by port and endpoint numbers" π like it says on the tin, she's not hiding anything.
πΈ SYNOPSIS πΈ
struct fwnode_handle * fwnode_graph_get_endpoint_by_id (const struct
fwnode_handle *fwnode , u32 port , u32 endpoint , unsigned long flags );
that's the whole signature, copy it exactly, don't get creative with it π
π¦ ARGUMENTS π¦
fwnodeβ the parentfwnode_handlethat's holding the graph, aka the whole friend group this endpoint lives in π«Άportβ the identifier of the port node, so like which port we're sliding into (respectfully) πendpointβ the identifier of the endpoint node sitting under that port node, the actual one you want πflagsβ thefwnodelookup flags, the little switches that change how the search behaves β
π₯ DESCRIPTION π₯
first things first, and this is important so listen up: the caller is responsible for calling fwnode_handle_put on the returned fwnode pointer. that's on you, bestie, not on the function. cleanup is your job π§Ήβ¨
now, the cute part. if FWNODE_GRAPH_ENDPOINT_NEXT is passed in flags and the endpoint you asked for hasn't been found, she doesn't just give up β she goes looking for the closest endpoint ID greater than the specified one and returns the endpoint that corresponds to it, if present. it's giving "next best thing" energy π
and here's the vibe check: she does not return endpoints that belong to disabled devices, or endpoints that are unconnected β unless, that is, FWNODE_GRAPH_DEVICE_DISABLED is passed in flags. then the doors open πͺβ¨
π RETURN π
she returns the fwnode handle of the local endpoint corresponding to your port and endpoint IDs π― β¦or NULL if it's not found π that's it, that's the whole deal.
π SEE ALSO π
the whole extended universe, fr fr β starting with the kernel file ./drivers/base/property.c:
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_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)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_count(9)fwnode_graph_parse_endpoint(9)fwnode_connection_find_match(9)fwnode_connection_find_matches(9)
π okay that's the whole page, go read the graph code, and don't forget the fwnode_handle_put or I will find out π«Ά
and that's a wrap, babe π
this little masterpiece lives in ./drivers/base and it's stamped October 2026 β slay, iconic, periodt β¨πΈπ¦
π¦ 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