• Home
  • Raw
  • Download

Lines Matching refs:fwnode

24 		&dev->of_node->fwnode : dev->fwnode;  in dev_fwnode()
46 bool fwnode_property_present(const struct fwnode_handle *fwnode, in fwnode_property_present() argument
51 ret = fwnode_call_bool_op(fwnode, property_present, propname); in fwnode_property_present()
52 if (ret == false && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_present()
53 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_present()
54 ret = fwnode_call_bool_op(fwnode->secondary, property_present, in fwnode_property_present()
229 static int fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in fwnode_property_read_int_array() argument
236 ret = fwnode_call_int_op(fwnode, property_read_int_array, propname, in fwnode_property_read_int_array()
238 if (ret == -EINVAL && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_read_int_array()
239 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_read_int_array()
241 fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
265 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u8_array() argument
268 return fwnode_property_read_int_array(fwnode, propname, sizeof(u8), in fwnode_property_read_u8_array()
291 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u16_array() argument
294 return fwnode_property_read_int_array(fwnode, propname, sizeof(u16), in fwnode_property_read_u16_array()
317 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u32_array() argument
320 return fwnode_property_read_int_array(fwnode, propname, sizeof(u32), in fwnode_property_read_u32_array()
343 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u64_array() argument
346 return fwnode_property_read_int_array(fwnode, propname, sizeof(u64), in fwnode_property_read_u64_array()
369 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode, in fwnode_property_read_string_array() argument
375 ret = fwnode_call_int_op(fwnode, property_read_string_array, propname, in fwnode_property_read_string_array()
377 if (ret == -EINVAL && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_read_string_array()
378 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_read_string_array()
379 ret = fwnode_call_int_op(fwnode->secondary, in fwnode_property_read_string_array()
401 int fwnode_property_read_string(const struct fwnode_handle *fwnode, in fwnode_property_read_string() argument
404 int ret = fwnode_property_read_string_array(fwnode, propname, val, 1); in fwnode_property_read_string()
425 int fwnode_property_match_string(const struct fwnode_handle *fwnode, in fwnode_property_match_string() argument
431 nval = fwnode_property_read_string_array(fwnode, propname, NULL, 0); in fwnode_property_match_string()
442 ret = fwnode_property_read_string_array(fwnode, propname, values, nval); in fwnode_property_match_string()
477 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode, in fwnode_property_get_reference_args() argument
482 return fwnode_call_int_op(fwnode, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
498 struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode, in fwnode_find_reference() argument
505 ret = fwnode_property_get_reference_args(fwnode, name, NULL, 0, index, in fwnode_find_reference()
507 return ret ? ERR_PTR(ret) : args.fwnode; in fwnode_find_reference()
521 struct fwnode_handle *fwnode = dev_fwnode(dev); in device_remove_properties() local
523 if (!fwnode) in device_remove_properties()
526 if (is_software_node(fwnode->secondary)) { in device_remove_properties()
527 fwnode_remove_software_node(fwnode->secondary); in device_remove_properties()
548 struct fwnode_handle *fwnode; in device_add_properties() local
550 fwnode = fwnode_create_software_node(properties, NULL); in device_add_properties()
551 if (IS_ERR(fwnode)) in device_add_properties()
552 return PTR_ERR(fwnode); in device_add_properties()
554 set_secondary_fwnode(dev, fwnode); in device_add_properties()
565 const char *fwnode_get_name(const struct fwnode_handle *fwnode) in fwnode_get_name() argument
567 return fwnode_call_ptr_op(fwnode, get_name); in fwnode_get_name()
578 const char *fwnode_get_name_prefix(const struct fwnode_handle *fwnode) in fwnode_get_name_prefix() argument
580 return fwnode_call_ptr_op(fwnode, get_name_prefix); in fwnode_get_name_prefix()
590 struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode) in fwnode_get_parent() argument
592 return fwnode_call_ptr_op(fwnode, get_parent); in fwnode_get_parent()
607 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode) in fwnode_get_next_parent() argument
609 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in fwnode_get_next_parent()
611 fwnode_handle_put(fwnode); in fwnode_get_next_parent()
628 struct device *fwnode_get_next_parent_dev(struct fwnode_handle *fwnode) in fwnode_get_next_parent_dev() argument
632 fwnode_handle_get(fwnode); in fwnode_get_next_parent_dev()
634 fwnode = fwnode_get_next_parent(fwnode); in fwnode_get_next_parent_dev()
635 if (fwnode) in fwnode_get_next_parent_dev()
636 dev = get_dev_from_fwnode(fwnode); in fwnode_get_next_parent_dev()
637 } while (fwnode && !dev); in fwnode_get_next_parent_dev()
638 fwnode_handle_put(fwnode); in fwnode_get_next_parent_dev()
648 unsigned int fwnode_count_parents(const struct fwnode_handle *fwnode) in fwnode_count_parents() argument
653 __fwnode = fwnode_get_parent(fwnode); in fwnode_count_parents()
674 struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode, in fwnode_get_nth_parent() argument
679 fwnode_handle_get(fwnode); in fwnode_get_nth_parent()
681 for (i = 0; i < depth && fwnode; i++) in fwnode_get_nth_parent()
682 fwnode = fwnode_get_next_parent(fwnode); in fwnode_get_nth_parent()
684 return fwnode; in fwnode_get_nth_parent()
721 fwnode_get_next_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_child_node() argument
724 return fwnode_call_ptr_op(fwnode, get_next_child_node, child); in fwnode_get_next_child_node()
735 fwnode_get_next_available_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_available_child_node() argument
740 if (!fwnode) in fwnode_get_next_available_child_node()
744 next_child = fwnode_get_next_child_node(fwnode, next_child); in fwnode_get_next_available_child_node()
763 struct fwnode_handle *fwnode = NULL, *next; in device_get_next_child_node() local
766 fwnode = &dev->of_node->fwnode; in device_get_next_child_node()
768 fwnode = acpi_fwnode_handle(adev); in device_get_next_child_node()
771 next = fwnode_get_next_child_node(fwnode, child); in device_get_next_child_node()
776 if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) in device_get_next_child_node()
777 next = fwnode_get_next_child_node(fwnode->secondary, child); in device_get_next_child_node()
789 fwnode_get_named_child_node(const struct fwnode_handle *fwnode, in fwnode_get_named_child_node() argument
792 return fwnode_call_ptr_op(fwnode, get_named_child_node, childname); in fwnode_get_named_child_node()
814 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode) in fwnode_handle_get() argument
816 if (!fwnode_has_op(fwnode, get)) in fwnode_handle_get()
817 return fwnode; in fwnode_handle_get()
819 return fwnode_call_ptr_op(fwnode, get); in fwnode_handle_get()
831 void fwnode_handle_put(struct fwnode_handle *fwnode) in fwnode_handle_put() argument
833 fwnode_call_void_op(fwnode, put); in fwnode_handle_put()
841 bool fwnode_device_is_available(const struct fwnode_handle *fwnode) in fwnode_device_is_available() argument
843 return fwnode_call_bool_op(fwnode, device_is_available); in fwnode_device_is_available()
900 int fwnode_get_phy_mode(struct fwnode_handle *fwnode) in fwnode_get_phy_mode() argument
905 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
907 err = fwnode_property_read_string(fwnode, in fwnode_get_phy_mode()
934 static void *fwnode_get_mac_addr(struct fwnode_handle *fwnode, in fwnode_get_mac_addr() argument
938 int ret = fwnode_property_read_u8_array(fwnode, name, addr, alen); in fwnode_get_mac_addr()
968 void *fwnode_get_mac_address(struct fwnode_handle *fwnode, char *addr, int alen) in fwnode_get_mac_address() argument
972 res = fwnode_get_mac_addr(fwnode, "mac-address", addr, alen); in fwnode_get_mac_address()
976 res = fwnode_get_mac_addr(fwnode, "local-mac-address", addr, alen); in fwnode_get_mac_address()
980 return fwnode_get_mac_addr(fwnode, "address", addr, alen); in fwnode_get_mac_address()
1004 int fwnode_irq_get(struct fwnode_handle *fwnode, unsigned int index) in fwnode_irq_get() argument
1006 struct device_node *of_node = to_of_node(fwnode); in fwnode_irq_get()
1013 ret = acpi_irq_get(ACPI_HANDLE_FWNODE(fwnode), index, &res); in fwnode_irq_get()
1030 fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_get_next_endpoint() argument
1033 return fwnode_call_ptr_op(fwnode, graph_get_next_endpoint, prev); in fwnode_graph_get_next_endpoint()
1064 fwnode_graph_get_remote_port_parent(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port_parent() argument
1068 endpoint = fwnode_graph_get_remote_endpoint(fwnode); in fwnode_graph_get_remote_port_parent()
1084 fwnode_graph_get_remote_port(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port() argument
1086 return fwnode_get_next_parent(fwnode_graph_get_remote_endpoint(fwnode)); in fwnode_graph_get_remote_port()
1097 fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_endpoint() argument
1099 return fwnode_call_ptr_op(fwnode, graph_get_remote_endpoint); in fwnode_graph_get_remote_endpoint()
1113 fwnode_graph_get_remote_node(const struct fwnode_handle *fwnode, u32 port_id, in fwnode_graph_get_remote_node() argument
1118 while ((endpoint = fwnode_graph_get_next_endpoint(fwnode, endpoint))) { in fwnode_graph_get_remote_node()
1162 fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode, in fwnode_graph_get_endpoint_by_id() argument
1170 while ((ep = fwnode_graph_get_next_endpoint(fwnode, ep))) { in fwnode_graph_get_endpoint_by_id()
1225 int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_parse_endpoint() argument
1230 return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint); in fwnode_graph_parse_endpoint()
1241 fwnode_graph_devcon_match(struct fwnode_handle *fwnode, const char *con_id, in fwnode_graph_devcon_match() argument
1248 fwnode_graph_for_each_endpoint(fwnode, ep) { in fwnode_graph_devcon_match()
1266 fwnode_devcon_match(struct fwnode_handle *fwnode, const char *con_id, in fwnode_devcon_match() argument
1274 node = fwnode_find_reference(fwnode, con_id, i); in fwnode_devcon_match()
1298 void *fwnode_connection_find_match(struct fwnode_handle *fwnode, in fwnode_connection_find_match() argument
1304 if (!fwnode || !match) in fwnode_connection_find_match()
1307 ret = fwnode_graph_devcon_match(fwnode, con_id, data, match); in fwnode_connection_find_match()
1311 return fwnode_devcon_match(fwnode, con_id, data, match); in fwnode_connection_find_match()