fwnode_prop...ead_u8_array(9)
π fwnode_property_read_u8_array β the Kernel API Manual, bestie edition β¨
okay so this is fwnode_prop...ead_u8_array(9), from the Kernel API Manual, and no cap it's giving "grab a whole little array of tiny numbers out of a firmware node" energy. it's literally in the NAME section and everything π
β¨ NAME β¨
fwnode_property_read_u8_array β return a u8 array property of firmware node π¦
πΈ SYNOPSIS πΈ
int fwnode_property_read_u8_array (const struct fwnode_handle *fwnode ,
const char *propname , u8 *val , size_t nval );
likeβ¦ that's the whole signature, she's not complicated, she just has four arguments and a dream π
π ARGUMENTS π
fwnodeβ the firmware node you wanna get the property of. that's your main character, the whole reason we're here πpropnameβ name of the property. literally just the string bestie π·οΈvalβ the values get stored here. OR you can passNULLif you just want the number of values back instead (iykyk) πnvalβ size of thevalarray. don't lie to her about this one fr fr π
π DESCRIPTION π
so basically: read an array of u8 properties with propname from fwnode, and store them into val if they're found. that's it, that's the vibe β
lowkey important note: it's recommended to callfwnode_property_count_u8instead of calling this function withvalequalsNULLandnvalequals0. like yes you can do the other thing but the count function is right there and she's literally built for it π§
π₯ RETURN π₯
what you get back, and it's giving β¨choose your own adventureβ¨:
- number of values if
valwasNULLπ 0if the property was found (success!) β slay π-EINVALif given arguments are not valid π«-ENODATAif the property does not have a value π-EPROTOif the property is not an array of numbers π-EOVERFLOWif the size of the property is not as expected π«-ENXIOif no suitable firmware interface is present π
π¦ SEE ALSO π¦
- Kernel file
./drivers/base/property.c
and the whole friend group, in order, no one left behind:
device_property_present(9)fwnode_property_present(9)device_property_read_bool(9)fwnode_property_read_bool(9)device_property_read_u8_array(9)device_property_read_u16_array(9)device_property_read_u32_array(9)device_property_read_u64_array(9)device_property_read_string_array(9)device_property_read_string(9)device_property_match_string(9)fwnode_property_read_u16_array(9)fwnode_property_read_u32_array(9)fwnode_property_read_u64_array(9)fwnode_property_read_string_array(9)fwnode_property_read_string(9)fwnode_property_match_string(9)fwnode_property_match_property_string(9)fwnode_property_get_reference_args(9)fwnode_find_reference(9)fwnode_get_name(9)fwnode_get_name_prefix(9)fwnode_name_eq(9)fwnode_get_parent(9)fwnode_get_next_parent(9)fwnode_count_parents(9)fwnode_get_nth_parent(9)fwnode_get_next_child_node(9)fwnode_get_next_available_child_node(9)device_get_next_child_node(9)fwnode_get_named_child_node(9)device_get_named_child_node(9)fwnode_handle_get(9)fwnode_device_is_available(9)fwnode_get_child_node_count(9)fwnode_get_named_child_node_count(9)fwnode_get_phy_mode(9)device_get_phy_mode(9)fwnode_iomap(9)fwnode_irq_get(9)fwnode_irq_get_byname(9)fwnode_graph_get_next_endpoint(9)fwnode_graph_get_port_parent(9)fwnode_graph_get_remote_port_parent(9)fwnode_graph_get_remote_port(9)fwnode_graph_get_remote_endpoint(9)fwnode_graph_get_endpoint_by_id(9)fwnode_graph_get_endpoint_count(9)fwnode_graph_parse_endpoint(9)fwnode_connection_find_match(9)fwnode_connection_find_matches(9)
and that's the whole page, bestie π this lil guy lives in ./drivers/base, the version/date stamp on her is October 2026, and she answers to fwnode_prop...ead_u8_array(9) if you ever need her π«Άβ¨
π¦ 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