fwnode_prope...ference_args(9)
π
fwnode_prope...ference_args(9) β a.k.a. fwnode_property_get_reference_args
okay bestie, welcome to the Kernel API Manual β¨ this one's a kernel function page, so grab your matcha and let's get into it π
πΈ NAME πΈ
fwnode_property_get_reference_args β find a reference with arguments π
β¨ SYNOPSIS β¨
int fwnode_property_get_reference_args (const struct fwnode_handle
*fwnode , const char *prop , const char *nargs_prop , unsigned int nargs
, unsigned int index , struct fwnode_reference_args *args );
π«Ά ARGUMENTS π«Ά
fwnodeβ the firmware node we're snooping in for that reference π like, this is the place we look.propβ the name of the property, i.e. what we're actually looking for πnargs_propβ the name of the property that tells you the number of arguments in the referred node. It'sNULLifnargsis already known β otherwisenargsgets ignored completely πnargsβ number of arguments. Lowkey ignored ifnargs_propis non-NULL, so don't come for it πindexβ index of the reference, from zero onwards π’argsβ result structure with the reference and the integer arguments. May beNULL, no pressure π«Ά
π DESCRIPTION π
So what it does: it obtains a reference based on a named property in an fwnode, with integer arguments. That's the whole vibe β¨
β οΈ important: the caller is responsible for callingfwnode_handle_puton the returnedargs->fwnodepointer. Not me, not the kernel, you. Don't leave it hanging, that's not slay π
π₯ RETURN π₯
0β on success, we ate π-ENOENTβ when theindexis out of bounds, theindexhas an empty reference, or the property was not found π-EINVALβ on parse error π-ENOTCONNβ when the remote firmware node exists but has not been registered yet π
π¦ SEE ALSO π¦
the kernel file lives at ./drivers/base/property.c β go look, iykyk π
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_string(9),fwnode_property_match_property_string(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)
that's the whole page, bestie, go be the main character in ./drivers/base π§ β Kernel API Manual, ./drivers/base, October 2026 π 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