of_property_read_u64_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_property_read_u64_array(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're in the big-league kernel docs now πŸŽ€ today's main character is of_property_read_u64_array, and she is literally here to find and read an array of 64 bit integers from a property. no cap. πŸ”₯


✨ NAME ✨

of_property_read_u64_array β€” Find and read an array of 64 bit integers from a property.

like. that's her whole job description and she ate πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int of_property_read_u64_array (const struct device_node *np , const
char *propname , u64 *out_values , size_t sz );

that's the whole signature, character for character, don't come for me πŸ™ˆ


🌸 ARGUMENTS 🌸

  • np β€” device node from which the property value is to be read. like, the node we're snooping through πŸ”
  • propname β€” name of the property to be searched. the thing we're looking for, iykyk
  • out_values β€” pointer to return value, modified only if return value is 0. big one: she does NOT touch your buffer unless everything went perfectly, periodt 🫢
  • sz β€” number of array elements to read. how many u64s you're asking for, be honest

πŸ’œ DESCRIPTION πŸ’œ

Search for a property in a device node and read 64-bit value(s) from it. that's it, that's the vibe check ✨

The out_values is modified only if a valid u64 value can be decoded. so if the decode doesn't work out, your array is untouched β€” she's not gonna leave you with half-baked garbage in your buffer, that would be so toxic πŸ’€


πŸ‘‘ RETURN πŸ‘‘

  • 0 β€” on success πŸŽ‰ slay, you got your integers
  • -EINVAL β€” if the property does not exist 😭 she looked everywhere, nothing
  • -ENODATA β€” if property does not have a value 🫠 it's there but it's giving empty
  • -EOVERFLOW β€” if the property data isn't large enough πŸ“ like, not enough bytes for what you asked for, embarrassing for everyone

🌈 SEE ALSO 🌈

Kernel file ./include/linux/of.h and honestly the whole friend group:


okay that's the whole page, go forth and read your u64 arrays πŸ’–

source: ./include/linux Β· date: October 2026 β€” mwah, that's the sign-off bestie, see u in the next manpage πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from