Lines Matching refs:fwnode
23 of_fwnode_handle(dev->of_node) : dev->fwnode; in dev_fwnode()
45 bool fwnode_property_present(const struct fwnode_handle *fwnode, in fwnode_property_present() argument
50 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_present()
53 ret = fwnode_call_bool_op(fwnode, property_present, propname); in fwnode_property_present()
57 return fwnode_call_bool_op(fwnode->secondary, property_present, propname); in fwnode_property_present()
245 static int fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in fwnode_property_read_int_array() argument
252 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_int_array()
255 ret = fwnode_call_int_op(fwnode, property_read_int_array, propname, in fwnode_property_read_int_array()
260 return fwnode_call_int_op(fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
285 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u8_array() argument
288 return fwnode_property_read_int_array(fwnode, propname, sizeof(u8), in fwnode_property_read_u8_array()
314 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u16_array() argument
317 return fwnode_property_read_int_array(fwnode, propname, sizeof(u16), in fwnode_property_read_u16_array()
343 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u32_array() argument
346 return fwnode_property_read_int_array(fwnode, propname, sizeof(u32), in fwnode_property_read_u32_array()
372 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u64_array() argument
375 return fwnode_property_read_int_array(fwnode, propname, sizeof(u64), in fwnode_property_read_u64_array()
401 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode, in fwnode_property_read_string_array() argument
407 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_string_array()
410 ret = fwnode_call_int_op(fwnode, property_read_string_array, propname, in fwnode_property_read_string_array()
415 return fwnode_call_int_op(fwnode->secondary, property_read_string_array, propname, in fwnode_property_read_string_array()
435 int fwnode_property_read_string(const struct fwnode_handle *fwnode, in fwnode_property_read_string() argument
438 int ret = fwnode_property_read_string_array(fwnode, propname, val, 1); in fwnode_property_read_string()
459 int fwnode_property_match_string(const struct fwnode_handle *fwnode, in fwnode_property_match_string() argument
465 nval = fwnode_property_read_string_array(fwnode, propname, NULL, 0); in fwnode_property_match_string()
476 ret = fwnode_property_read_string_array(fwnode, propname, values, nval); in fwnode_property_match_string()
511 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode, in fwnode_property_get_reference_args() argument
518 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_get_reference_args()
521 ret = fwnode_call_int_op(fwnode, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
526 if (IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_get_reference_args()
529 return fwnode_call_int_op(fwnode->secondary, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
545 struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode, in fwnode_find_reference() argument
552 ret = fwnode_property_get_reference_args(fwnode, name, NULL, 0, index, in fwnode_find_reference()
554 return ret ? ERR_PTR(ret) : args.fwnode; in fwnode_find_reference()
564 const char *fwnode_get_name(const struct fwnode_handle *fwnode) in fwnode_get_name() argument
566 return fwnode_call_ptr_op(fwnode, get_name); in fwnode_get_name()
577 const char *fwnode_get_name_prefix(const struct fwnode_handle *fwnode) in fwnode_get_name_prefix() argument
579 return fwnode_call_ptr_op(fwnode, get_name_prefix); in fwnode_get_name_prefix()
589 struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode) in fwnode_get_parent() argument
591 return fwnode_call_ptr_op(fwnode, get_parent); in fwnode_get_parent()
606 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode) in fwnode_get_next_parent() argument
608 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in fwnode_get_next_parent()
610 fwnode_handle_put(fwnode); in fwnode_get_next_parent()
627 struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode) in fwnode_get_next_parent_dev() argument
632 fwnode_for_each_parent_node(fwnode, parent) { in fwnode_get_next_parent_dev()
648 unsigned int fwnode_count_parents(const struct fwnode_handle *fwnode) in fwnode_count_parents() argument
653 fwnode_for_each_parent_node(fwnode, parent) in fwnode_count_parents()
672 struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, in fwnode_get_nth_parent() argument
678 return fwnode_handle_get(fwnode); in fwnode_get_nth_parent()
680 fwnode_for_each_parent_node(fwnode, parent) { in fwnode_get_nth_parent()
722 fwnode_get_next_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_child_node() argument
725 return fwnode_call_ptr_op(fwnode, get_next_child_node, child); in fwnode_get_next_child_node()
736 fwnode_get_next_available_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_available_child_node() argument
741 if (IS_ERR_OR_NULL(fwnode)) in fwnode_get_next_available_child_node()
745 next_child = fwnode_get_next_child_node(fwnode, next_child); in fwnode_get_next_available_child_node()
762 const struct fwnode_handle *fwnode = dev_fwnode(dev); in device_get_next_child_node() local
765 if (IS_ERR_OR_NULL(fwnode)) in device_get_next_child_node()
769 next = fwnode_get_next_child_node(fwnode, child); in device_get_next_child_node()
774 return fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
784 fwnode_get_named_child_node(const struct fwnode_handle *fwnode, in fwnode_get_named_child_node() argument
787 return fwnode_call_ptr_op(fwnode, get_named_child_node, childname); in fwnode_get_named_child_node()
809 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode) in fwnode_handle_get() argument
811 if (!fwnode_has_op(fwnode, get)) in fwnode_handle_get()
812 return fwnode; in fwnode_handle_get()
814 return fwnode_call_ptr_op(fwnode, get); in fwnode_handle_get()
826 void fwnode_handle_put(struct fwnode_handle *fwnode) in fwnode_handle_put() argument
828 fwnode_call_void_op(fwnode, put); in fwnode_handle_put()
839 bool fwnode_device_is_available(const struct fwnode_handle *fwnode) in fwnode_device_is_available() argument
841 if (IS_ERR_OR_NULL(fwnode)) in fwnode_device_is_available()
844 if (!fwnode_has_op(fwnode, device_is_available)) in fwnode_device_is_available()
847 return fwnode_call_bool_op(fwnode, device_is_available); in fwnode_device_is_available()
890 int fwnode_get_phy_mode(struct fwnode_handle *fwnode) in fwnode_get_phy_mode() argument
895 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
897 err = fwnode_property_read_string(fwnode, in fwnode_get_phy_mode()
931 void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index) in fwnode_iomap() argument
933 return fwnode_call_ptr_op(fwnode, iomap, index); in fwnode_iomap()
945 int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index) in fwnode_irq_get() argument
947 return fwnode_call_int_op(fwnode, irq_get, index); in fwnode_irq_get()
965 int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name) in fwnode_irq_get_byname() argument
972 index = fwnode_property_match_string(fwnode, "interrupt-names", name); in fwnode_irq_get_byname()
976 return fwnode_irq_get(fwnode, index); in fwnode_irq_get_byname()
989 fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_get_next_endpoint() argument
1003 parent = fwnode; in fwnode_graph_get_next_endpoint()
1042 fwnode_graph_get_remote_port_parent(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port_parent() argument
1046 endpoint = fwnode_graph_get_remote_endpoint(fwnode); in fwnode_graph_get_remote_port_parent()
1062 fwnode_graph_get_remote_port(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port() argument
1064 return fwnode_get_next_parent(fwnode_graph_get_remote_endpoint(fwnode)); in fwnode_graph_get_remote_port()
1075 fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_endpoint() argument
1077 return fwnode_call_ptr_op(fwnode, graph_get_remote_endpoint); in fwnode_graph_get_remote_endpoint()
1114 fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_by_id() argument
1122 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_get_endpoint_by_id()
1169 unsigned int fwnode_graph_get_endpoint_count(struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_count() argument
1175 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_get_endpoint_count()
1194 int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_parse_endpoint() argument
1199 return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint); in fwnode_graph_parse_endpoint()
1209 static unsigned int fwnode_graph_devcon_matches(struct fwnode_handle *fwnode, in fwnode_graph_devcon_matches() argument
1220 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_devcon_matches()
1243 static unsigned int fwnode_devcon_matches(struct fwnode_handle *fwnode, in fwnode_devcon_matches() argument
1258 node = fwnode_find_reference(fwnode, con_id, i); in fwnode_devcon_matches()
1285 void *fwnode_connection_find_match(struct fwnode_handle *fwnode, in fwnode_connection_find_match() argument
1292 if (!fwnode || !match) in fwnode_connection_find_match()
1295 count = fwnode_graph_devcon_matches(fwnode, con_id, data, match, &ret, 1); in fwnode_connection_find_match()
1299 count = fwnode_devcon_matches(fwnode, con_id, data, match, &ret, 1); in fwnode_connection_find_match()
1322 int fwnode_connection_find_matches(struct fwnode_handle *fwnode, in fwnode_connection_find_matches() argument
1330 if (!fwnode || !match) in fwnode_connection_find_matches()
1333 count_graph = fwnode_graph_devcon_matches(fwnode, con_id, data, match, in fwnode_connection_find_matches()
1341 count_ref = fwnode_devcon_matches(fwnode, con_id, data, match, in fwnode_connection_find_matches()