fwnode_prop...ead_u8_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– fwnode_property_read_u8_array β€” the Kernel API Manual, bestie edition ✨

okay so this is fwnode_prop...ead_u8_array(9), from the Kernel API Manual, and no cap it's giving "grab a whole little array of tiny numbers out of a firmware node" energy. it's literally in the NAME section and everything πŸŽ€


✨ NAME ✨

fwnode_property_read_u8_array β€” return a u8 array property of firmware node πŸ¦‹


🌸 SYNOPSIS 🌸

int fwnode_property_read_u8_array (const struct fwnode_handle *fwnode ,
const char *propname , u8 *val , size_t nval );

like… that's the whole signature, she's not complicated, she just has four arguments and a dream πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • fwnode β€” the firmware node you wanna get the property of. that's your main character, the whole reason we're here πŸ‘‘
  • propname β€” name of the property. literally just the string bestie 🏷️
  • val β€” the values get stored here. OR you can pass NULL if you just want the number of values back instead (iykyk) πŸ™ˆ
  • nval β€” size of the val array. don't lie to her about this one fr fr πŸ“

πŸ’€ DESCRIPTION πŸ’€

so basically: read an array of u8 properties with propname from fwnode, and store them into val if they're found. that's it, that's the vibe ⭐

lowkey important note: it's recommended to call fwnode_property_count_u8 instead of calling this function with val equals NULL and nval equals 0. like yes you can do the other thing but the count function is right there and she's literally built for it 🧚

πŸ”₯ RETURN πŸ”₯

what you get back, and it's giving ✨choose your own adventure✨:

  • number of values if val was NULL πŸ’–
  • 0 if the property was found (success!) β€” slay 🌈
  • -EINVAL if given arguments are not valid 🚫
  • -ENODATA if the property does not have a value 😭
  • -EPROTO if the property is not an array of numbers πŸ’€
  • -EOVERFLOW if the size of the property is not as expected 🫠
  • -ENXIO if no suitable firmware interface is present πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/base/property.c

and the whole friend group, in order, no one left behind:


and that's the whole page, bestie πŸ’œ this lil guy lives in ./drivers/base, the version/date stamp on her is October 2026, and she answers to fwnode_prop...ead_u8_array(9) if you ever need her 🫢✨

πŸ“¦ where this page comes from