fwnode_get_...d_node_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:

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