of_property_read_u8_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ of_property_read_u8_array(9) πŸ¦‹

okay so this is a page from the Kernel API Manual, and honestly? it's a little icon of a function. let's get into it ✨


🌸 NAME 🌸

of_property_read_u8_array β€” find a property and read an array of u8 out of it. yes bestie, an array, plural, multiple lil bytes. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int of_property_read_u8_array (const struct device_node *np , const char
*propname , u8 *out_values , size_t sz );

πŸ’– ARGUMENTS πŸ’–

  • np β€” the device node you're reading the property value from. your starting point, your home base 🏠
  • propname β€” the name of the property we're out here searching for, like a lil scavenger hunt πŸ”
  • out_values β€” pointer to the return value. heads up though: it's modified only if the return value is 0. no success, no touchy πŸ™ˆ
  • sz β€” how many array elements we're reading. the count. the amount. the vibe check number πŸ’«

✨ DESCRIPTION ✨

so what it does: search for a property inside a device node and read 8-bit value(s) from it. that's it, that's the gig 🫢

the dts entry of the array should look like this, literally:

property = /bits/ 8 <0x50 0x60 0x70>;

and the out_values? it's modified only if a valid u8 value can be decoded. no valid decode = no writes, periodt πŸ’€


πŸ”₯ RETURN πŸ”₯

  • 0 β€” slay, success πŸ‘‘
  • -EINVAL β€” the property does not exist 😭
  • -ENODATA β€” the property exists but does not have a value 🫠
  • -EOVERFLOW β€” the property data isn't large enough πŸ’€

🌈 SEE ALSO 🌈

go read these next, bestie, they're all in the kernel file ./include/linux/of.h:


and that's the whole page, bestie, you ate that πŸ’…βœ¨

mwah πŸ’‹ β€” this one came from ./include/linux, dated October 2026, and it's still signed of_property_read_u8_array(9) because consistency is iconic 🌟

πŸ“¦ where this page comes from