of_property_read_u32_array(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ of_property_read_u32_array(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” this is the page for of_property_read_u32_array, and it's literally the glow-up you need for reading a whole lil squad of 32-bit integers out of a device-tree property. no cap, it's iconic.


🌸 NAME 🌸

of_property_read_u32_array β€” find and read an array of 32 bit integers from a property πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int of_property_read_u32_array (const struct device_node *np , const
       char *propname , u32 *out_values , size_t sz );

like, that's the whole vibe right there ⭐


πŸ’– ARGUMENTS πŸ’–

  • np β€” the device node you're reading the property value from. your main character node, basically πŸ‘‘
  • propname β€” the name of the property to be searched. this is the thing you're hunting for, iykyk πŸ”
  • out_values β€” pointer to the return value. heads up though: it only gets modified if the return value is 0. so no sneaky writes on failure, periodt πŸ™ˆ
  • sz β€” the number of array elements to read. that's how many lil u32s you're asking for, fr fr

✨ DESCRIPTION ✨

Search for a property in a device node and read 32-bit value(s) from it. that's the whole assignment, bestie πŸ’œ

the way that out_values is modified only if a valid u32 value can be decoded β€” that's the safety vibe check, and we love her for it 🫢


πŸ”₯ RETURN πŸ”₯

  • 0 on success β€” slay, you did it πŸŽ‰
  • -EINVAL if the property does not exist 😭
  • -ENODATA if property does not have a value πŸ’€
  • -EOVERFLOW if the property data isn't large enough β€” like, not enough room, bestie, it's giving "buffer said no" πŸ“

🌈 SEE ALSO 🌈

Kernel file ./include/linux/of.h β€” and the whole friend group:


bestie reminder: this page lives at ./include/linux, it's dated October 2026, and the whole thing is filed under of_property_read_u32_array(9). mwah πŸ’‹ go read some u32s, queen πŸ§šβ€β™€οΈ
πŸ“¦ where this page comes from