of_property_read_u32_array(9)
β¨ 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 is0. 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 π₯
0on success β slay, you did it π-EINVALif the property does not exist π-ENODATAif property does not have a value π-EOVERFLOWif 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:
of_node_init(9)of_machine_is_compatible(9)of_parse_phandle(9)of_parse_phandle_with_args(9)of_parse_phandle_with_fixed_args(9)of_parse_phandle_with_optional_args(9)of_phandle_args_equal(9)of_property_count_u8_elems(9)of_property_count_u16_elems(9)of_property_count_u32_elems(9)of_property_count_u64_elems(9)of_property_read_string_array(9)of_property_count_strings(9)of_property_read_string_index(9)of_property_present(9)of_property_read_u8_array(9)of_property_read_u16_array(9)of_property_read_u64_array(9)struct of_changeset_entry(9)struct of_changeset(9)of_device_is_system_power_controller(9)of_have_populated_dt(9)
bestie reminder: this page lives at./include/linux, it's dated October 2026, and the whole thing is filed underof_property_read_u32_array(9). mwah π go read some u32s, queen π§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms