of_property_read_u32_index(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is of_property_read_u32_index(9) from the Kernel API Manual, and its whole job is to find and read a u32 from a multi-value property. that's it, that's the vibe. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

int of_property_read_u32_index (const struct device_node *np , const
char *propname , u32 index , u32 *out_value );

🌸 ARGUMENTS 🌸

  • np β€” device node from which the property value is to be read.
  • propname β€” name of the property to be searched.
  • index β€” index of the u32 in the list of values.
  • out_value β€” pointer to return value, modified only if no error.

πŸŽ€ DESCRIPTION πŸŽ€

picture this: you've got a device node, and you need the nth 32-bit value from one of its properties. this function searches for that property in the device node and reads the nth 32-bit value from it. πŸ”₯

the out_value is modified only if a valid u32 value can be decoded. so if it's giving invalid, your pointer stays untouched. no cap. πŸ’…

⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • -EINVAL if the property does not exist πŸ™ˆ
  • -ENODATA if property does not have a value 😭
  • -EOVERFLOW if the property data isn't large enough πŸ’€

🌈 SEE ALSO 🌈

Kernel file: ./drivers/of/property.c β€” that's the spot. and here's the whole bestie list:


and that's the whole page, bestie 🫢 β€” source/version ./drivers/of, dated October 2026, for of_property_read_u32_index(9). bye πŸ’œ

πŸ“¦ where this page comes from