fwnode_prope...ference_args(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… fwnode_prope...ference_args(9) β€” a.k.a. fwnode_property_get_reference_args

okay bestie, welcome to the Kernel API Manual ✨ this one's a kernel function page, so grab your matcha and let's get into it πŸ“


🌸 NAME 🌸

fwnode_property_get_reference_args β€” find a reference with arguments πŸŽ€


✨ SYNOPSIS ✨

int fwnode_property_get_reference_args (const struct fwnode_handle
*fwnode , const char *prop , const char *nargs_prop , unsigned int nargs
, unsigned int index , struct fwnode_reference_args *args );

🫢 ARGUMENTS 🫢

  • fwnode β€” the firmware node we're snooping in for that reference πŸ‘€ like, this is the place we look.
  • prop β€” the name of the property, i.e. what we're actually looking for πŸ’–
  • nargs_prop β€” the name of the property that tells you the number of arguments in the referred node. It's NULL if nargs is already known β€” otherwise nargs gets ignored completely πŸ™ˆ
  • nargs β€” number of arguments. Lowkey ignored if nargs_prop is non-NULL, so don't come for it πŸ’€
  • index β€” index of the reference, from zero onwards πŸ”’
  • args β€” result structure with the reference and the integer arguments. May be NULL, no pressure 🫢

πŸ’– DESCRIPTION πŸ’–

So what it does: it obtains a reference based on a named property in an fwnode, with integer arguments. That's the whole vibe ✨

⚠️ important: the caller is responsible for calling fwnode_handle_put on the returned args->fwnode pointer. Not me, not the kernel, you. Don't leave it hanging, that's not slay πŸ’…

πŸ”₯ RETURN πŸ”₯

  • 0 β€” on success, we ate πŸ‘‘
  • -ENOENT β€” when the index is out of bounds, the index has an empty reference, or the property was not found 😭
  • -EINVAL β€” on parse error πŸ’€
  • -ENOTCONN β€” when the remote firmware node exists but has not been registered yet πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file lives at ./drivers/base/property.c β€” go look, iykyk πŸ“


that's the whole page, bestie, go be the main character in ./drivers/base 🧚 β€” Kernel API Manual, ./drivers/base, October 2026 πŸ’œ periodt. 🌈

πŸ“¦ where this page comes from