of_find_prop...alue_of_size(9)
π¦ of_find_propβ¦alue_of_size(9) π¦
okay so bestie, welcome to the glow-up of of_find_prop...alue_of_size, straight out of the Kernel API Manual (yes the header on the original was literally of_find_prop...alue_of_size(9) twice, the truncated name is iconic honestly, we stan a mysterious queen π
).
β¨ NAME β¨
of_find_property_value_of_size β and that's literally it, the manpage gives us a dash and then nothing, no cap π she said "my name is enough."
πΈ SYNOPSIS πΈ
void * of_find_property_value_of_size (const struct device_node *np ,
const char *propname , u32 min , u32 max , size_t *len );
like yes she returns a void *, she's flexible, she contains multitudes π«Ά
π ARGUMENTS π
npβ the device node you're pulling this property value out of. your source of truth, your main character node πpropnameβ the name of the property we're hunting for. the search term, the vibe check πminβ the minimum allowed length of the property value. she has standards.maxβ the maximum allowed length of the property value, and heads up:0means unlimited β¨ (zero says "no thoughts, no ceiling, go off")lenβ if it's!=NULL, the actual length gets written right here. a lil out-parameter, a lil gift π
π DESCRIPTION π
Search for a property in a device node and valid the requested size. π¦
(that's the original wording's grammar, we're keeping the energy fr fr β the point is: you go looking for the property, and you check that its size is within the bounds you asked for. size validation, that's the whole gig.)
π₯ RETURN π₯
- The property value on success β slay, she ate π
-EINVALβ if the property does not exist π (no property, no prophecy)-ENODATAβ if the property does not have a value π (she exists but she's empty, giving ghost)-EOVERFLOWβ if the property data is too small or too large π (goldilocks violation, neither porridge is acceptable)
ngl always check your return value, bestie β those error codes are not decorative π
π SEE ALSO π
Kernel file ./drivers/of/property.c, plus the whole friend group right here:
of_property_read_bool(9)of_graph_is_present(9)of_property_count_elems_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_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)
like that's the entire group chat, every single one of them π
and that's the whole page!! mwah π§ββοΈ huge thanks to the fine folks over at ./drivers/of β this one's dated October 2026, and the original footer still signs off with of_find_prop...alue_of_size(9) so we're matching that energy, 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