fwnode_prope...match_string(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ fwnode_property_match_string ✨

okay bestie, welcome to the Kernel API Manual πŸ’– this one's called fwnode_property_match_string and honestly? it's a little baddie with one job and it does it well. let's get into it πŸŽ€


🌸 NAME 🌸

fwnode_property_match_string β€” find a string in an array and return index πŸ‘‘

like... you give it a string, it tells you where that string is chillin' in the array. that's the whole vibe. iykyk πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int fwnode_property_match_string (const struct fwnode_handle *fwnode ,
const char *propname , const char *string );

literally three things in, one int out. simple. iconic. no notes. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • fwnode β€” the firmware node you're getting the property of. this is the node, the main character 🫢
  • propname β€” the name of the property that's holding the array. yes, the array one. that one πŸ’–
  • string β€” the string you're looking for. the one you're hunting down. go find her πŸ”

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜• β€” this function goes looking for a given string inside a string array, and if it finds it? it hands you back the index. that's it. that's the whole function. it finds and it returns. slay πŸ’…


🌈 RETURN 🌈

okay so what comes back, and what does it mean:

  • the index, starting from 0, if the property was found (success! πŸŽ‰)
  • -EINVAL if the given arguments are not valid πŸ™ˆ
  • -ENODATA if the property does not have a value 😭
  • -EPROTO if the property is not an array of strings πŸ’€
  • -ENXIO if no suitable firmware interface is present 🧚
ngl bestie, that last three are all "something's off with the input or the environment" energy β€” nothing you did, it's just the vibes being wrong ✨

⭐ SEE ALSO ⭐

the whole friend group 🫢 β€” the Kernel file ./drivers/base/property.c plus:


okay that's the page!! πŸ¦‹ and before you go β€” this little gem lives in ./drivers/base 🏠 and it's dated October 2026 πŸ—“οΈ so yeah, mark your calendar bestie. mwah, go read your properties πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from