fwnode_get_...d_node_count(9)
π fwnode_get_...d_node_count(9) β like, the Kernel API Manual, section 9, bestie π
okay so real talk, this is from the Kernel API Manual (section 9, we love a classic), and the whole page is about fwnode_get_named_child_node_count. yes the title got chopped with an ellipsis, it's giving "name too long for the header", we've all been there π
β¨ NAME β¨
fwnode_get_named_child_node_count β literally just counts how many child nodes have a given name. that's it. that's the whole job π«Ά
πΈ SYNOPSIS πΈ
unsigned int fwnode_get_named_child_node_count (const struct fwnode_handle *fwnode , const char *name );
two args, one unsigned int coming back at you, no cap β¨
π¦ ARGUMENTS π¦
fwnodeβ the node whose child nodes are being counted. like, the mom node. the main character. everything below it gets scanned πnameβ the string you're matching child node names against. exact name energy only, bestie π―
π DESCRIPTION π
so what it does is scan the child nodes and count all the ones that have a specific name. that's the vibe check, and honestly it's giving "let me just tally my faves" π§
Potential E.g.:
fwnode_get_named_child_node_count(fwnode, "channel");
and like, fwnode_get_named_child_node_count(fwnode, "channel"); would match all the nodes:
channel { }, channel0 {}, channel0xabba {}...
see how it's not just the bare channel? it's matching the whole lil family, prefix-style. iconic behaviour honestly π
β RETURN β
returns the number of child nodes with a matching name for a given device. a unsigned int, sitting there, counting. we stan a numeric queen π
π₯ SEE ALSO π₯
kernel file ./drivers/base/property.c β and like, the entire extended friend group of property functions, all in section 9:
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_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, an entire roster. go read them, iykyk πβ¨
ngl the header is a whole tragedy:fwnode_get_...d_node_count(9)β truncated mid-name, screaming into the void π and the whole page lives under./drivers/base, stamped October 2026. consider this your cute lil sign-off bestie, mwah ππ
that's the page!! go count some nodes, 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