Lines Matching refs:fwnode

23 	struct fwnode_handle fwnode;  member
29 static inline bool is_pset_node(const struct fwnode_handle *fwnode) in is_pset_node() argument
31 return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &pset_fwnode_ops; in is_pset_node()
40 struct property_set, fwnode) : \
254 &dev->of_node->fwnode : dev->fwnode; in dev_fwnode()
258 static bool pset_fwnode_property_present(const struct fwnode_handle *fwnode, in pset_fwnode_property_present() argument
261 return !!pset_prop_get(to_pset_node(fwnode), propname); in pset_fwnode_property_present()
264 static int pset_fwnode_read_int_array(const struct fwnode_handle *fwnode, in pset_fwnode_read_int_array() argument
269 const struct property_set *node = to_pset_node(fwnode); in pset_fwnode_read_int_array()
289 pset_fwnode_property_read_string_array(const struct fwnode_handle *fwnode, in pset_fwnode_property_read_string_array() argument
293 return pset_prop_read_string_array(to_pset_node(fwnode), propname, in pset_fwnode_property_read_string_array()
321 bool fwnode_property_present(const struct fwnode_handle *fwnode, in fwnode_property_present() argument
326 ret = fwnode_call_bool_op(fwnode, property_present, propname); in fwnode_property_present()
327 if (ret == false && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_present()
328 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_present()
329 ret = fwnode_call_bool_op(fwnode->secondary, property_present, in fwnode_property_present()
504 static int fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in fwnode_property_read_int_array() argument
511 ret = fwnode_call_int_op(fwnode, property_read_int_array, propname, in fwnode_property_read_int_array()
513 if (ret == -EINVAL && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_read_int_array()
514 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_read_int_array()
516 fwnode->secondary, property_read_int_array, propname, in fwnode_property_read_int_array()
540 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u8_array() argument
543 return fwnode_property_read_int_array(fwnode, propname, sizeof(u8), in fwnode_property_read_u8_array()
566 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u16_array() argument
569 return fwnode_property_read_int_array(fwnode, propname, sizeof(u16), in fwnode_property_read_u16_array()
592 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u32_array() argument
595 return fwnode_property_read_int_array(fwnode, propname, sizeof(u32), in fwnode_property_read_u32_array()
618 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode, in fwnode_property_read_u64_array() argument
621 return fwnode_property_read_int_array(fwnode, propname, sizeof(u64), in fwnode_property_read_u64_array()
644 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode, in fwnode_property_read_string_array() argument
650 ret = fwnode_call_int_op(fwnode, property_read_string_array, propname, in fwnode_property_read_string_array()
652 if (ret == -EINVAL && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_read_string_array()
653 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_read_string_array()
654 ret = fwnode_call_int_op(fwnode->secondary, in fwnode_property_read_string_array()
676 int fwnode_property_read_string(const struct fwnode_handle *fwnode, in fwnode_property_read_string() argument
679 int ret = fwnode_property_read_string_array(fwnode, propname, val, 1); in fwnode_property_read_string()
700 int fwnode_property_match_string(const struct fwnode_handle *fwnode, in fwnode_property_match_string() argument
706 nval = fwnode_property_read_string_array(fwnode, propname, NULL, 0); in fwnode_property_match_string()
717 ret = fwnode_property_read_string_array(fwnode, propname, values, nval); in fwnode_property_match_string()
752 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode, in fwnode_property_get_reference_args() argument
757 return fwnode_call_int_op(fwnode, get_reference_args, prop, nargs_prop, in fwnode_property_get_reference_args()
958 struct fwnode_handle *fwnode; in device_remove_properties() local
961 fwnode = dev_fwnode(dev); in device_remove_properties()
962 if (!fwnode) in device_remove_properties()
969 pset = to_pset_node(fwnode); in device_remove_properties()
973 pset = to_pset_node(fwnode->secondary); in device_remove_properties()
1005 p->fwnode.ops = &pset_fwnode_ops; in device_add_properties()
1006 set_secondary_fwnode(dev, &p->fwnode); in device_add_properties()
1023 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode) in fwnode_get_next_parent() argument
1025 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in fwnode_get_next_parent()
1027 fwnode_handle_put(fwnode); in fwnode_get_next_parent()
1040 struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode) in fwnode_get_parent() argument
1042 return fwnode_call_ptr_op(fwnode, get_parent); in fwnode_get_parent()
1052 fwnode_get_next_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_child_node() argument
1055 return fwnode_call_ptr_op(fwnode, get_next_child_node, child); in fwnode_get_next_child_node()
1066 fwnode_get_next_available_child_node(const struct fwnode_handle *fwnode, in fwnode_get_next_available_child_node() argument
1071 if (!fwnode) in fwnode_get_next_available_child_node()
1075 next_child = fwnode_get_next_child_node(fwnode, next_child); in fwnode_get_next_available_child_node()
1094 struct fwnode_handle *fwnode = NULL; in device_get_next_child_node() local
1097 fwnode = &dev->of_node->fwnode; in device_get_next_child_node()
1099 fwnode = acpi_fwnode_handle(adev); in device_get_next_child_node()
1101 return fwnode_get_next_child_node(fwnode, child); in device_get_next_child_node()
1111 fwnode_get_named_child_node(const struct fwnode_handle *fwnode, in fwnode_get_named_child_node() argument
1114 return fwnode_call_ptr_op(fwnode, get_named_child_node, childname); in fwnode_get_named_child_node()
1136 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode) in fwnode_handle_get() argument
1138 if (!fwnode_has_op(fwnode, get)) in fwnode_handle_get()
1139 return fwnode; in fwnode_handle_get()
1141 return fwnode_call_ptr_op(fwnode, get); in fwnode_handle_get()
1153 void fwnode_handle_put(struct fwnode_handle *fwnode) in fwnode_handle_put() argument
1155 fwnode_call_void_op(fwnode, put); in fwnode_handle_put()
1163 bool fwnode_device_is_available(const struct fwnode_handle *fwnode) in fwnode_device_is_available() argument
1165 return fwnode_call_bool_op(fwnode, device_is_available); in fwnode_device_is_available()
1222 int fwnode_get_phy_mode(struct fwnode_handle *fwnode) in fwnode_get_phy_mode() argument
1227 err = fwnode_property_read_string(fwnode, "phy-mode", &pm); in fwnode_get_phy_mode()
1229 err = fwnode_property_read_string(fwnode, in fwnode_get_phy_mode()
1256 static void *fwnode_get_mac_addr(struct fwnode_handle *fwnode, in fwnode_get_mac_addr() argument
1260 int ret = fwnode_property_read_u8_array(fwnode, name, addr, alen); in fwnode_get_mac_addr()
1290 void *fwnode_get_mac_address(struct fwnode_handle *fwnode, char *addr, int alen) in fwnode_get_mac_address() argument
1294 res = fwnode_get_mac_addr(fwnode, "mac-address", addr, alen); in fwnode_get_mac_address()
1298 res = fwnode_get_mac_addr(fwnode, "local-mac-address", addr, alen); in fwnode_get_mac_address()
1302 return fwnode_get_mac_addr(fwnode, "address", addr, alen); in fwnode_get_mac_address()
1326 int fwnode_irq_get(struct fwnode_handle *fwnode, unsigned int index) in fwnode_irq_get() argument
1328 struct device_node *of_node = to_of_node(fwnode); in fwnode_irq_get()
1335 ret = acpi_irq_get(ACPI_HANDLE_FWNODE(fwnode), index, &res); in fwnode_irq_get()
1352 fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_get_next_endpoint() argument
1355 return fwnode_call_ptr_op(fwnode, graph_get_next_endpoint, prev); in fwnode_graph_get_next_endpoint()
1386 fwnode_graph_get_remote_port_parent(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port_parent() argument
1390 endpoint = fwnode_graph_get_remote_endpoint(fwnode); in fwnode_graph_get_remote_port_parent()
1406 fwnode_graph_get_remote_port(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_port() argument
1408 return fwnode_get_next_parent(fwnode_graph_get_remote_endpoint(fwnode)); in fwnode_graph_get_remote_port()
1419 fwnode_graph_get_remote_endpoint(const struct fwnode_handle *fwnode) in fwnode_graph_get_remote_endpoint() argument
1421 return fwnode_call_ptr_op(fwnode, graph_get_remote_endpoint); in fwnode_graph_get_remote_endpoint()
1435 fwnode_graph_get_remote_node(const struct fwnode_handle *fwnode, u32 port_id, in fwnode_graph_get_remote_node() argument
1440 while ((endpoint = fwnode_graph_get_next_endpoint(fwnode, endpoint))) { in fwnode_graph_get_remote_node()
1472 int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, in fwnode_graph_parse_endpoint() argument
1477 return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint); in fwnode_graph_parse_endpoint()