of_property_read_u64_index(9)
π of_property_read_u64_index(9)
okay so bestie, welcome to the Kernel API Manual, and today's main character is of_property_read_u64_index(9) β say that five times fast, i promise it's worth it π«Ά
β¨ NAME β¨
of_property_read_u64_index β find and read a u64 from a multi-value property. like, you go looking for it, and then you read it. iconic behavior honestly π
πΈ SYNOPSIS πΈ
int of_property_read_u64_index (const struct device_node *np , const
char *propname , u32 index , u64 *out_value );
π¦ ARGUMENTS π¦
npβ the device node you're reading the property value from. your starting point, your home base, your main character node πpropnameβ name of the property to be searched. literally the thing you're looking for, bestie.indexβ index of the u64 in the list of values. yes, it's a list, yes you gotta pick one π₯out_valueβ pointer to return value, and it gets modified only if no error. no cap, it stays untouched if things go sideways π
β DESCRIPTION β
So what does it actually do? it searches for a property in a device node and reads the *n*th 64-bit value from it. that's the whole vibe. one property, one node, one 64-bit value, selected by index π
And the important little caveat, because details matter: the out_value is modified only if a valid u64 value can be decoded. no valid u64, no touchy. periodt. β¨
π RETURN π
0on success β slay, it worked π-EINVALif the property does not exist β girl, it's not there π-ENODATAif property does not have a value β it exists but it's giving absolutely nothing π-EOVERFLOWif the property data isn't large enough β too small, didn't fit, awkward πΈ
π SEE ALSO π
Kernel file ./drivers/of/property.c β that's where the magic lives, go look, 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_variable_u8_array(9)of_property_read_variable_u16_array(9)of_property_read_variable_u32_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)
ok that's the whole page, bestie β go read some u64s responsibly, and remember: out_value only changes when there's a valid value to decode. no error, no write. we respect the pointer in this house π«Ά
and that's a wrap!! brought to you by ./drivers/of, dated October 2026, filed lovingly under of_property_read_u64_index(9) β mwah πβ¨π
π¦ 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