Lines Matching refs:fwnode

24 		of_fwnode_handle(dev->of_node) : dev->fwnode;  in __dev_fwnode()
31 of_fwnode_handle(dev->of_node) : dev->fwnode; in __dev_fwnode_const()
57 bool fwnode_property_present(const struct fwnode_handle *fwnode, in fwnode_property_present() argument
62 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_present()
65 ret = fwnode_call_bool_op(fwnode, property_present, propname); in fwnode_property_present()
69 return fwnode_call_bool_op(fwnode->secondary, property_present, propname); in fwnode_property_present()
95 bool fwnode_property_read_bool(const struct fwnode_handle *fwnode, in fwnode_property_read_bool() argument
100 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_bool()
103 ret = fwnode_call_bool_op(fwnode, property_read_bool, propname); in fwnode_property_read_bool()
107 return fwnode_call_bool_op(fwnode->secondary, property_read_bool, propname); in fwnode_property_read_bool()
295 static int fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in fwnode_property_read_int_array() argument
302 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_int_array()
305 ret = fwnode_call_int_op(fwnode, property_read_int_array, propname, in fwnode_property_read_int_array()
310 return fwnode_call_int_op(fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
335 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u8_array() argument
338 return fwnode_property_read_int_array(fwnode, propname, sizeof(u8), in fwnode_property_read_u8_array()
364 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u16_array() argument
367 return fwnode_property_read_int_array(fwnode, propname, sizeof(u16), in fwnode_property_read_u16_array()
393 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u32_array() argument
396 return fwnode_property_read_int_array(fwnode, propname, sizeof(u32), in fwnode_property_read_u32_array()
422 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u64_array() argument
425 return fwnode_property_read_int_array(fwnode, propname, sizeof(u64), in fwnode_property_read_u64_array()
451 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode, in fwnode_property_read_string_array() argument
457 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_string_array()
460 ret = fwnode_call_int_op(fwnode, property_read_string_array, propname, in fwnode_property_read_string_array()
465 return fwnode_call_int_op(fwnode->secondary, property_read_string_array, propname, in fwnode_property_read_string_array()
485 int fwnode_property_read_string(const struct fwnode_handle *fwnode, in fwnode_property_read_string() argument
488 int ret = fwnode_property_read_string_array(fwnode, propname, val, 1); in fwnode_property_read_string()
509 int fwnode_property_match_string(const struct fwnode_handle *fwnode, in fwnode_property_match_string() argument
515 nval = fwnode_property_string_array_count(fwnode, propname); in fwnode_property_match_string()
526 ret = fwnode_property_read_string_array(fwnode, propname, values, nval); in fwnode_property_match_string()
557 int fwnode_property_match_property_string(const struct fwnode_handle *fwnode, in fwnode_property_match_property_string() argument
563 ret = fwnode_property_read_string(fwnode, propname, &string); in fwnode_property_match_property_string()
598 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode, in fwnode_property_get_reference_args() argument
605 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_get_reference_args()
608 ret = fwnode_call_int_op(fwnode, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
613 if (IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_get_reference_args()
616 return fwnode_call_int_op(fwnode->secondary, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
635 struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode, in fwnode_find_reference() argument
642 ret = fwnode_property_get_reference_args(fwnode, name, NULL, 0, index, in fwnode_find_reference()
644 return ret ? ERR_PTR(ret) : args.fwnode; in fwnode_find_reference()
654 const char *fwnode_get_name(const struct fwnode_handle *fwnode) in fwnode_get_name() argument
656 return fwnode_call_ptr_op(fwnode, get_name); in fwnode_get_name()
667 const char *fwnode_get_name_prefix(const struct fwnode_handle *fwnode) in fwnode_get_name_prefix() argument
669 return fwnode_call_ptr_op(fwnode, get_name_prefix); in fwnode_get_name_prefix()
685 bool fwnode_name_eq(const struct fwnode_handle *fwnode, const char *name) in fwnode_name_eq() argument
690 node_name = fwnode_get_name(fwnode); in fwnode_name_eq()
710 struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode) in fwnode_get_parent() argument
712 return fwnode_call_ptr_op(fwnode, get_parent); in fwnode_get_parent()
731 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode) in fwnode_get_next_parent() argument
733 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in fwnode_get_next_parent()
735 fwnode_handle_put(fwnode); in fwnode_get_next_parent()
747 unsigned int fwnode_count_parents(const struct fwnode_handle *fwnode) in fwnode_count_parents() argument
752 fwnode_for_each_parent_node(fwnode, parent) in fwnode_count_parents()
771 struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, in fwnode_get_nth_parent() argument
777 return fwnode_handle_get(fwnode); in fwnode_get_nth_parent()
779 fwnode_for_each_parent_node(fwnode, parent) { in fwnode_get_nth_parent()
797 fwnode_get_next_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_child_node() argument
800 return fwnode_call_ptr_op(fwnode, get_next_child_node, child); in fwnode_get_next_child_node()
814 fwnode_get_next_available_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_available_child_node() argument
819 if (IS_ERR_OR_NULL(fwnode)) in fwnode_get_next_available_child_node()
823 next_child = fwnode_get_next_child_node(fwnode, next_child); in fwnode_get_next_available_child_node()
844 const struct fwnode_handle *fwnode = dev_fwnode(dev); in device_get_next_child_node() local
847 if (IS_ERR_OR_NULL(fwnode)) in device_get_next_child_node()
851 next = fwnode_get_next_child_node(fwnode, child); in device_get_next_child_node()
856 return fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
869 fwnode_get_named_child_node(const struct fwnode_handle *fwnode, in fwnode_get_named_child_node() argument
872 return fwnode_call_ptr_op(fwnode, get_named_child_node, childname); in fwnode_get_named_child_node()
900 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode) in fwnode_handle_get() argument
902 if (!fwnode_has_op(fwnode, get)) in fwnode_handle_get()
903 return fwnode; in fwnode_handle_get()
905 return fwnode_call_ptr_op(fwnode, get); in fwnode_handle_get()
918 bool fwnode_device_is_available(const struct fwnode_handle *fwnode) in fwnode_device_is_available() argument
920 if (IS_ERR_OR_NULL(fwnode)) in fwnode_device_is_available()
923 if (!fwnode_has_op(fwnode, device_is_available)) in fwnode_device_is_available()
926 return fwnode_call_bool_op(fwnode, device_is_available); in fwnode_device_is_available()
936 unsigned int fwnode_get_child_node_count(const struct fwnode_handle *fwnode) in fwnode_get_child_node_count() argument
941 fwnode_for_each_child_node(fwnode, child) in fwnode_get_child_node_count()
962 unsigned int fwnode_get_named_child_node_count(const struct fwnode_handle *fwnode, in fwnode_get_named_child_node_count() argument
968 fwnode_for_each_named_child_node(fwnode, child, name) in fwnode_get_named_child_node_count()
998 int fwnode_get_phy_mode(const struct fwnode_handle *fwnode) in fwnode_get_phy_mode() argument
1003 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
1005 err = fwnode_property_read_string(fwnode, in fwnode_get_phy_mode()
1039 void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index) in fwnode_iomap() argument
1041 return fwnode_call_ptr_op(fwnode, iomap, index); in fwnode_iomap()
1052 int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) in fwnode_irq_get() argument
1056 ret = fwnode_call_int_op(fwnode, irq_get, index); in fwnode_irq_get()
1078 int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name) in fwnode_irq_get_byname() argument
1085 index = fwnode_property_match_string(fwnode, "interrupt-names", name); in fwnode_irq_get_byname()
1089 return fwnode_irq_get(fwnode, index); in fwnode_irq_get_byname()
1106 fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_get_next_endpoint() argument
1121 parent = fwnode; in fwnode_graph_get_next_endpoint()
1171 fwnode_graph_get_remote_port_parent(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port_parent() argument
1175 endpoint = fwnode_graph_get_remote_endpoint(fwnode); in fwnode_graph_get_remote_port_parent()
1194 fwnode_graph_get_remote_port(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port() argument
1196 return fwnode_get_next_parent(fwnode_graph_get_remote_endpoint(fwnode)); in fwnode_graph_get_remote_port()
1210 fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_endpoint() argument
1212 return fwnode_call_ptr_op(fwnode, graph_get_remote_endpoint); in fwnode_graph_get_remote_endpoint()
1249 fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_by_id() argument
1257 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_get_endpoint_by_id()
1304 unsigned int fwnode_graph_get_endpoint_count(const struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_count() argument
1310 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_get_endpoint_count()
1329 int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_parse_endpoint() argument
1334 return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint); in fwnode_graph_parse_endpoint()
1344 static unsigned int fwnode_graph_devcon_matches(const struct fwnode_handle *fwnode, in fwnode_graph_devcon_matches() argument
1355 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_devcon_matches()
1378 static unsigned int fwnode_devcon_matches(const struct fwnode_handle *fwnode, in fwnode_devcon_matches() argument
1393 node = fwnode_find_reference(fwnode, con_id, i); in fwnode_devcon_matches()
1420 void *fwnode_connection_find_match(const struct fwnode_handle *fwnode, in fwnode_connection_find_match() argument
1427 if (!fwnode || !match) in fwnode_connection_find_match()
1430 count = fwnode_graph_devcon_matches(fwnode, con_id, data, match, &ret, 1); in fwnode_connection_find_match()
1434 count = fwnode_devcon_matches(fwnode, con_id, data, match, &ret, 1); in fwnode_connection_find_match()
1458 int fwnode_connection_find_matches(const struct fwnode_handle *fwnode, in fwnode_connection_find_matches() argument
1466 if (!fwnode || !match) in fwnode_connection_find_matches()
1469 count_graph = fwnode_graph_devcon_matches(fwnode, con_id, data, match, in fwnode_connection_find_matches()
1477 count_ref = fwnode_devcon_matches(fwnode, con_id, data, match, in fwnode_connection_find_matches()