of_find_node_with_property(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ of_find_node_with_property β€” from the Kernel API Manual, bestie πŸ’œ

okay so real talk, this page is of_find_node_with_property(9) and it's like... the friend who finds the person at the party who has the exact thing you're looking for. It's in the Kernel API Manual, and I'm gonna walk you through it like we're texting at 2am πŸ¦‹


✨ NAME ✨

of_find_node_with_property β€” Find a node which has a property with the given name.

like, that's it. that's the whole vibe check. it goes looking for a node, and the node it wants is the one carrying a property with the name you gave it. periodt πŸ’…


🌸 SYNOPSIS 🌸

struct device_node * of_find_node_with_property (struct device_node
*from , const char *prop_name );

note the return type: struct device_node *. you're getting a pointer back, not the actual node. keep that in mind for the RETURN section, because it MATTERS, and I'm not gonna let you forget it πŸŽ€


🫢 ARGUMENTS 🫢

  • from β€” the node you start searching from, or NULL. Here's the spicy part that people always get wrong: the node you pass will not be searched, only the next one will. So it's not "start here," it's "start after here." Typically you pass whatever the previous call returned β€” like a lil relay race πŸƒβ€β™€οΈ. Also, of_node_put will be called on it.
  • prop_name β€” the name of the property you're looking for. the thing the node has to actually, physically, no-cap have. πŸ”₯

πŸ‘‘ RETURN πŸ‘‘

You get a node pointer, and the refcount is incremented β€” so bestie, you own a reference now, and you've gotta call of_node_put on it when you're done. Not doing that is giving leak energy and we don't do that here πŸ˜­πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./drivers/of/base.c β€” plus literally the whole extended friend group:

ngl that SEE ALSO list is giving "invited the entire group chat to the function" but every single one of them is iconic in their own right πŸ’–

k that's the whole page, mwah πŸ’‹ β€” sourced from ./drivers/of, dated October 2026, and this was of_find_node_with_property(9) from the Kernel API Manual. go forth and call of_node_put, my love πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from