of_property...le_u32_array(9)
π of_property_read_variable_u32_array β Kernel API Manual, section 9
okay bestie, so you're in the Kernel API Manual (section 9, very demure, very kernel) and you've stumbled onto of_property_read_variable_u32_array. Don't panic. She's actually iconic once you get to know her. β¨
πΈ NAME
of_property_read_variable_u32_array β find and read an array of 32 bit integers from a property, with bounds on the minimum and maximum array size. literally she reads your numbers and checks they're within the vibe check limits π
π¦ SYNOPSIS
int of_property_read_variable_u32_array (const struct device_node *np ,
const char *propname , u32 *out_values , size_t sz_min , size_t sz_max
);
look at her. four params, one return int, zero notes. she's booked and busy. π
π― ARGUMENTS
npβ the device node from which the property value is to be read. your main character node, the source of truth π«Άpropnameβ name of the property to be searched. yes bestie, you gotta name it, she's not a mind reader πout_valuesβ pointer to return found values. this is where the slay lands β¨sz_minβ minimum number of array elements to read. the floor, the bare minimum, the no-less-than πsz_maxβ maximum number of array elements to read. and listen: if zero there is no upper limit on the number of elements in the dts entry but onlysz_minwill be read. that's a whole mood, so don't come crying when you only getsz_minback π
π₯ DESCRIPTION
Search for a property in a device node and read 32-bit value(s) from it. that's it, that's the job. she finds it, she reads it, she moves on. no cap. β
The out_values is modified only if a valid u32 value can be decoded. so if the decoding flops, your buffer stays untouched β no half-written chaos, no leftovers, we love a careful queen π
π RETURN
The number of elements read on success. and when she's not happy:
-EINVALβ if the property does not exist. ghosted π-ENODATAβ if property does not have a value. present but empty, the worst kind of energy π-EOVERFLOWβ if the property data is smaller thansz_minor longer thansz_max. too little, or too much, both unaccepted bestie π
π SEE ALSO
Kernel file ./drivers/of/property.c β go read the source, iykyk π§
of_property_read_bool(9)of_graph_is_present(9)of_property_count_elems_of_size(9)of_find_property_value_of_size(9)of_property_read_u8_index(9)of_property_read_u16_index(9)of_property_read_u32_index(9)of_property_read_u64_index(9)of_property_read_variable_u8_array(9)of_property_read_variable_u16_array(9)of_property_read_u64(9)of_property_read_variable_u64_array(9)of_property_read_string(9)of_property_match_string(9)of_property_read_string_helper(9)of_graph_parse_endpoint(9)of_graph_get_port_by_id(9)of_graph_get_next_port(9)of_graph_get_next_port_endpoint(9)of_graph_get_next_endpoint(9)of_graph_get_endpoint_by_regs(9)of_graph_get_remote_endpoint(9)of_graph_get_port_parent(9)of_graph_get_remote_port_parent(9)of_graph_get_remote_port(9)of_graph_get_endpoint_count(9)of_graph_get_port_count(9)of_graph_get_remote_node(9)parse_prop_cells(9)parse_suffix_prop_cells(9)struct supplier_bindings(9)of_link_property(9)
that's a whole friend group right there, and they all ate π
reminder bestie:sz_maxbeing0does not mean "read everything" β it means no upper limit exists on the dts entry, but onlysz_mingets read. read it twice. tattoo it. π
that's the whole page, no notes π this came out of ./drivers/of, dated October 2026, in the Kernel API Manual β mwah, go read your device trees, ily, periodt. πβ¨
π¦ 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