Lines Matching refs:fwnode

23 		of_fwnode_handle(dev->of_node) : dev->fwnode;  in __dev_fwnode()
30 of_fwnode_handle(dev->of_node) : dev->fwnode; in __dev_fwnode_const()
56 bool fwnode_property_present(const struct fwnode_handle *fwnode, in fwnode_property_present() argument
61 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_present()
64 ret = fwnode_call_bool_op(fwnode, property_present, propname); in fwnode_property_present()
68 return fwnode_call_bool_op(fwnode->secondary, property_present, propname); in fwnode_property_present()
256 static int fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in fwnode_property_read_int_array() argument
263 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_int_array()
266 ret = fwnode_call_int_op(fwnode, property_read_int_array, propname, in fwnode_property_read_int_array()
271 return fwnode_call_int_op(fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
296 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u8_array() argument
299 return fwnode_property_read_int_array(fwnode, propname, sizeof(u8), in fwnode_property_read_u8_array()
325 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u16_array() argument
328 return fwnode_property_read_int_array(fwnode, propname, sizeof(u16), in fwnode_property_read_u16_array()
354 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u32_array() argument
357 return fwnode_property_read_int_array(fwnode, propname, sizeof(u32), in fwnode_property_read_u32_array()
383 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u64_array() argument
386 return fwnode_property_read_int_array(fwnode, propname, sizeof(u64), in fwnode_property_read_u64_array()
412 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode, in fwnode_property_read_string_array() argument
418 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_string_array()
421 ret = fwnode_call_int_op(fwnode, property_read_string_array, propname, in fwnode_property_read_string_array()
426 return fwnode_call_int_op(fwnode->secondary, property_read_string_array, propname, in fwnode_property_read_string_array()
446 int fwnode_property_read_string(const struct fwnode_handle *fwnode, in fwnode_property_read_string() argument
449 int ret = fwnode_property_read_string_array(fwnode, propname, val, 1); in fwnode_property_read_string()
470 int fwnode_property_match_string(const struct fwnode_handle *fwnode, in fwnode_property_match_string() argument
476 nval = fwnode_property_read_string_array(fwnode, propname, NULL, 0); in fwnode_property_match_string()
487 ret = fwnode_property_read_string_array(fwnode, propname, values, nval); in fwnode_property_match_string()
523 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode, in fwnode_property_get_reference_args() argument
530 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_get_reference_args()
533 ret = fwnode_call_int_op(fwnode, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
538 if (IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_get_reference_args()
541 return fwnode_call_int_op(fwnode->secondary, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
560 struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode, in fwnode_find_reference() argument
567 ret = fwnode_property_get_reference_args(fwnode, name, NULL, 0, index, in fwnode_find_reference()
569 return ret ? ERR_PTR(ret) : args.fwnode; in fwnode_find_reference()
579 const char *fwnode_get_name(const struct fwnode_handle *fwnode) in fwnode_get_name() argument
581 return fwnode_call_ptr_op(fwnode, get_name); in fwnode_get_name()
592 const char *fwnode_get_name_prefix(const struct fwnode_handle *fwnode) in fwnode_get_name_prefix() argument
594 return fwnode_call_ptr_op(fwnode, get_name_prefix); in fwnode_get_name_prefix()
607 struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode) in fwnode_get_parent() argument
609 return fwnode_call_ptr_op(fwnode, get_parent); in fwnode_get_parent()
628 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode) in fwnode_get_next_parent() argument
630 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in fwnode_get_next_parent()
632 fwnode_handle_put(fwnode); in fwnode_get_next_parent()
651 struct device *fwnode_get_next_parent_dev(const struct fwnode_handle *fwnode) in fwnode_get_next_parent_dev() argument
656 fwnode_for_each_parent_node(fwnode, parent) { in fwnode_get_next_parent_dev()
672 unsigned int fwnode_count_parents(const struct fwnode_handle *fwnode) in fwnode_count_parents() argument
677 fwnode_for_each_parent_node(fwnode, parent) in fwnode_count_parents()
696 struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, in fwnode_get_nth_parent() argument
702 return fwnode_handle_get(fwnode); in fwnode_get_nth_parent()
704 fwnode_for_each_parent_node(fwnode, parent) { in fwnode_get_nth_parent()
750 fwnode_get_next_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_child_node() argument
753 return fwnode_call_ptr_op(fwnode, get_next_child_node, child); in fwnode_get_next_child_node()
767 fwnode_get_next_available_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_available_child_node() argument
772 if (IS_ERR_OR_NULL(fwnode)) in fwnode_get_next_available_child_node()
776 next_child = fwnode_get_next_child_node(fwnode, next_child); in fwnode_get_next_available_child_node()
797 const struct fwnode_handle *fwnode = dev_fwnode(dev); in device_get_next_child_node() local
800 if (IS_ERR_OR_NULL(fwnode)) in device_get_next_child_node()
804 next = fwnode_get_next_child_node(fwnode, child); in device_get_next_child_node()
809 return fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
822 fwnode_get_named_child_node(const struct fwnode_handle *fwnode, in fwnode_get_named_child_node() argument
825 return fwnode_call_ptr_op(fwnode, get_named_child_node, childname); in fwnode_get_named_child_node()
853 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode) in fwnode_handle_get() argument
855 if (!fwnode_has_op(fwnode, get)) in fwnode_handle_get()
856 return fwnode; in fwnode_handle_get()
858 return fwnode_call_ptr_op(fwnode, get); in fwnode_handle_get()
870 void fwnode_handle_put(struct fwnode_handle *fwnode) in fwnode_handle_put() argument
872 fwnode_call_void_op(fwnode, put); in fwnode_handle_put()
885 bool fwnode_device_is_available(const struct fwnode_handle *fwnode) in fwnode_device_is_available() argument
887 if (IS_ERR_OR_NULL(fwnode)) in fwnode_device_is_available()
890 if (!fwnode_has_op(fwnode, device_is_available)) in fwnode_device_is_available()
893 return fwnode_call_bool_op(fwnode, device_is_available); in fwnode_device_is_available()
938 int fwnode_get_phy_mode(const struct fwnode_handle *fwnode) in fwnode_get_phy_mode() argument
943 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
945 err = fwnode_property_read_string(fwnode, in fwnode_get_phy_mode()
979 void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index) in fwnode_iomap() argument
981 return fwnode_call_ptr_op(fwnode, iomap, index); in fwnode_iomap()
992 int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) in fwnode_irq_get() argument
996 ret = fwnode_call_int_op(fwnode, irq_get, index); in fwnode_irq_get()
1018 int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name) in fwnode_irq_get_byname() argument
1025 index = fwnode_property_match_string(fwnode, "interrupt-names", name); in fwnode_irq_get_byname()
1029 return fwnode_irq_get(fwnode, index); in fwnode_irq_get_byname()
1046 fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_get_next_endpoint() argument
1061 parent = fwnode; in fwnode_graph_get_next_endpoint()
1111 fwnode_graph_get_remote_port_parent(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port_parent() argument
1115 endpoint = fwnode_graph_get_remote_endpoint(fwnode); in fwnode_graph_get_remote_port_parent()
1134 fwnode_graph_get_remote_port(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port() argument
1136 return fwnode_get_next_parent(fwnode_graph_get_remote_endpoint(fwnode)); in fwnode_graph_get_remote_port()
1150 fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_endpoint() argument
1152 return fwnode_call_ptr_op(fwnode, graph_get_remote_endpoint); in fwnode_graph_get_remote_endpoint()
1189 fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_by_id() argument
1197 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_get_endpoint_by_id()
1244 unsigned int fwnode_graph_get_endpoint_count(const struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_count() argument
1250 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_get_endpoint_count()
1269 int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_parse_endpoint() argument
1274 return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint); in fwnode_graph_parse_endpoint()
1284 static unsigned int fwnode_graph_devcon_matches(const struct fwnode_handle *fwnode, in fwnode_graph_devcon_matches() argument
1295 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_devcon_matches()
1318 static unsigned int fwnode_devcon_matches(const struct fwnode_handle *fwnode, in fwnode_devcon_matches() argument
1333 node = fwnode_find_reference(fwnode, con_id, i); in fwnode_devcon_matches()
1360 void *fwnode_connection_find_match(const struct fwnode_handle *fwnode, in fwnode_connection_find_match() argument
1367 if (!fwnode || !match) in fwnode_connection_find_match()
1370 count = fwnode_graph_devcon_matches(fwnode, con_id, data, match, &ret, 1); in fwnode_connection_find_match()
1374 count = fwnode_devcon_matches(fwnode, con_id, data, match, &ret, 1); in fwnode_connection_find_match()
1398 int fwnode_connection_find_matches(const struct fwnode_handle *fwnode, in fwnode_connection_find_matches() argument
1406 if (!fwnode || !match) in fwnode_connection_find_matches()
1409 count_graph = fwnode_graph_devcon_matches(fwnode, con_id, data, match, in fwnode_connection_find_matches()
1417 count_ref = fwnode_devcon_matches(fwnode, con_id, data, match, in fwnode_connection_find_matches()