fwnode_property_read_string(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– fwnode_property_read_string(9) πŸ’–

okay so this is a page from the Kernel API Manual, section 9 β€” and bestie, it's a little function that goes and asks a firmware node for a string. that's it. that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

fwnode_property_read_string β€” return a string property of a firmware node πŸ¦‹


🌸 SYNOPSIS 🌸

int fwnode_property_read_string (const struct fwnode_handle *fwnode ,
const char *propname , const char **val );

πŸ’… ARGUMENTS πŸ’…

  • fwnode β€” the firmware node you're getting the property of, i.e. the main character of this whole operation πŸ‘‘
  • propname β€” the name of the property. yes, the string you're looking up is itself a string. we love a recursive moment πŸ’€
  • val β€” the value gets stored here. this is where the answer lands, so make sure it's a real place to put things 🫢

🌈 DESCRIPTION 🌈

so what it does: it reads the property called propname from the firmware node you handed it, and if it actually finds it, it drops the value into val. ✨

and ngl, it's not just grabbing whatever's there β€” the value gets checked to be a string first. so if it's giving "not a string", the function is gonna have opinions about that (see the return values below, she's thorough 😭).


⭐ RETURN ⭐

  • 0 β€” the property was found. success, we ate, periodt πŸ’…
  • -EINVAL β€” the arguments you gave are not valid πŸ™ˆ
  • -ENODATA β€” the property exists but it doesn't have a value, like a text with no reply πŸ’€
  • -EPROTO or -EILSEQ β€” the property is not a string 😀
  • -ENXIO β€” no suitable firmware interface is present 🧚

πŸŽ€ SEE ALSO πŸŽ€

the kernel file lives at ./drivers/base/property.c β€” and wow, she brought her whole friend group. literally the entire roster, no cap:


ok that's the whole page bestie, go read your string properties responsibly πŸ’œ

and that's a wrap, babe β€” this came out of ./drivers/base, dated October 2026, and it's fwnode_property_read_string(9) forever and ever, mwah πŸ“βœ¨

πŸ“¦ where this page comes from