fwnode_property_read_string(9)
π fwnode_property_read_string(9) π
okay so this is a page from the Kernel API Manual, section 9 β and bestie, it's a little function that goes and asks a firmware node for a string. that's it. that's the whole vibe. let's get into it π
β¨ NAME β¨
fwnode_property_read_string β return a string property of a firmware node π¦
πΈ SYNOPSIS πΈ
int fwnode_property_read_string (const struct fwnode_handle *fwnode ,
const char *propname , const char **val );
π ARGUMENTS π
fwnodeβ the firmware node you're getting the property of, i.e. the main character of this whole operation πpropnameβ the name of the property. yes, the string you're looking up is itself a string. we love a recursive moment πvalβ the value gets stored here. this is where the answer lands, so make sure it's a real place to put things π«Ά
π DESCRIPTION π
so what it does: it reads the property called propname from the firmware node you handed it, and if it actually finds it, it drops the value into val. β¨
and ngl, it's not just grabbing whatever's there β the value gets checked to be a string first. so if it's giving "not a string", the function is gonna have opinions about that (see the return values below, she's thorough π).
β RETURN β
0β the property was found. success, we ate, periodt π-EINVALβ the arguments you gave are not valid π-ENODATAβ the property exists but it doesn't have a value, like a text with no reply π-EPROTOor-EILSEQβ the property is not a string π€-ENXIOβ no suitable firmware interface is present π§
π SEE ALSO π
the kernel file lives at ./drivers/base/property.c β and wow, she brought her whole friend group. literally the entire roster, no cap:
- the present / bool girlies:
device_property_present(9),fwnode_property_present(9),device_property_read_bool(9),fwnode_property_read_bool(9) - the array squad:
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_u8_array(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_match_string(9),fwnode_property_match_property_string(9) - the reference finders:
fwnode_property_get_reference_args(9),fwnode_find_reference(9) - the name & family tree crew:
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) - the phy / iomap / irq besties:
fwnode_get_phy_mode(9),device_get_phy_mode(9),fwnode_iomap(9),fwnode_irq_get(9),fwnode_irq_get_byname(9) - the graph girlies:
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) - the connection matchmakers:
fwnode_connection_find_match(9),fwnode_connection_find_matches(9)
ok that's the whole page bestie, go read your string properties responsibly π
and that's a wrap, babe β this came out of ./drivers/base, dated October 2026, and it's fwnode_property_read_string(9) forever and ever, 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