fwnode_prope...match_string(9)
β¨ fwnode_property_match_string β¨
okay bestie, welcome to the Kernel API Manual π this one's called fwnode_property_match_string and honestly? it's a little baddie with one job and it does it well. let's get into it π
πΈ NAME πΈ
fwnode_property_match_string β find a string in an array and return index π
like... you give it a string, it tells you where that string is chillin' in the array. that's the whole vibe. iykyk π
π¦ SYNOPSIS π¦
int fwnode_property_match_string (const struct fwnode_handle *fwnode ,
const char *propname , const char *string );
literally three things in, one int out. simple. iconic. no notes. β¨
π ARGUMENTS π
fwnodeβ the firmware node you're getting the property of. this is the node, the main character π«Άpropnameβ the name of the property that's holding the array. yes, the array one. that one πstringβ the string you're looking for. the one you're hunting down. go find her π
π DESCRIPTION π
so here's the tea β β this function goes looking for a given string inside a string array, and if it finds it? it hands you back the index. that's it. that's the whole function. it finds and it returns. slay π
π RETURN π
okay so what comes back, and what does it mean:
- the index, starting from
0, if the property was found (success! π) -EINVALif the given arguments are not valid π-ENODATAif the property does not have a value π-EPROTOif the property is not an array of strings π-ENXIOif no suitable firmware interface is present π§
ngl bestie, that last three are all "something's off with the input or the environment" energy β nothing you did, it's just the vibes being wrong β¨
β SEE ALSO β
the whole friend group π«Ά β the Kernel file ./drivers/base/property.c plus:
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_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_read_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)
okay that's the page!! π¦ and before you go β this little gem lives in ./drivers/base π and it's dated October 2026 ποΈ so yeah, mark your calendar bestie. mwah, go read your properties πβ¨π
π¦ 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