fwnode_get_parent(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fwnode_get_parent(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's a little baby page about the fwnode_get_parent(9) function πŸŽ€ and honestly it's short but she's important, so let's get into it 🫢


✨ NAME ✨

fwnode_get_parent β€” return parent firwmare node 🌸

(yes that spelling is literally what the page says, i'm not touching it, i don't make the rules πŸ’€)


🌈 SYNOPSIS 🌈

struct fwnode_handle * fwnode_get_parent (const struct fwnode_handle
*fwnode );

like... she returns a struct fwnode_handle * and she takes one const struct fwnode_handle * and that's the whole vibe ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • fwnode β€” the firmware whose parent is being retrieved, i.e. the node you're asking "who's ur mom" about πŸ‘‘ fwnode is the placeholder name here btw, that's just how manpages talk

πŸ’– DESCRIPTION πŸ’–

ok so this is the part where you have to actually be responsible 😭

The caller is responsible for calling fwnode_handle_put on the returned fwnode pointer. 🚨

like no cap, if you get a pointer back you own a reference and you gotta give it back with fwnode_handle_put, otherwise you're leaking and that's not icon energy πŸ™ˆ


⭐ RETURN ⭐

you get the parent firmware node of the given node if possible 🌱 β€” or NULL if there was no parent available πŸ’€ (device at the top of the tree, you're on your own bestie)


🌸 SEE ALSO 🌸

first up, the source of truth is literally the kernel file ./drivers/base/property.c and the whole squad lives in ./drivers/base 🧚

like that's the whole friend group, and yes they all have (9) after them, iykyk πŸ’…


and that's the page bestie!! πŸŽ€ literally so short but so real

signing off from ./drivers/base β€” October 2026 ⭐ this page was brought to you by the Kernel API Manual, mwah πŸ’–πŸ¦‹

πŸ“¦ where this page comes from