Lines Matching refs:fwnode

16 #include <linux/fwnode.h>
54 bool fwnode_property_present(const struct fwnode_handle *fwnode,
56 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode,
59 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode,
62 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode,
65 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode,
68 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode,
71 int fwnode_property_read_string(const struct fwnode_handle *fwnode,
73 int fwnode_property_match_string(const struct fwnode_handle *fwnode,
76 bool fwnode_device_is_available(const struct fwnode_handle *fwnode);
78 static inline bool fwnode_device_is_big_endian(const struct fwnode_handle *fwnode)
80 if (fwnode_property_present(fwnode, "big-endian"))
83 fwnode_property_present(fwnode, "native-endian"))
89 bool fwnode_device_is_compatible(const struct fwnode_handle *fwnode, const char *compat)
91 return fwnode_property_match_string(fwnode, "compatible", compat) >= 0;
122 int fwnode_property_match_property_string(const struct fwnode_handle *fwnode,
134 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode,
139 struct fwnode_handle *fwnode_find_reference(const struct fwnode_handle *fwnode,
143 const char *fwnode_get_name(const struct fwnode_handle *fwnode);
144 const char *fwnode_get_name_prefix(const struct fwnode_handle *fwnode);
145 bool fwnode_name_eq(const struct fwnode_handle *fwnode, const char *name);
147 struct fwnode_handle *fwnode_get_parent(const struct fwnode_handle *fwnode);
148 struct fwnode_handle *fwnode_get_next_parent(struct fwnode_handle *fwnode);
150 #define fwnode_for_each_parent_node(fwnode, parent) \
151 for (parent = fwnode_get_parent(fwnode); parent; \
158 const struct fwnode_handle *fwnode, struct fwnode_handle *child);
160 const struct fwnode_handle *fwnode, struct fwnode_handle *child);
162 #define fwnode_for_each_child_node(fwnode, child) \
163 for (child = fwnode_get_next_child_node(fwnode, NULL); child; \
164 child = fwnode_get_next_child_node(fwnode, child))
166 #define fwnode_for_each_available_child_node(fwnode, child) \
167 for (child = fwnode_get_next_available_child_node(fwnode, NULL); child;\
168 child = fwnode_get_next_available_child_node(fwnode, child))
177 struct fwnode_handle *fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
182 struct fwnode_handle *fwnode_handle_get(struct fwnode_handle *fwnode);
183 void fwnode_handle_put(struct fwnode_handle *fwnode);
185 int fwnode_irq_get(const struct fwnode_handle *fwnode, unsigned int index);
186 int fwnode_irq_get_byname(const struct fwnode_handle *fwnode, const char *name);
246 static inline bool fwnode_property_read_bool(const struct fwnode_handle *fwnode,
249 return fwnode_property_present(fwnode, propname);
252 static inline int fwnode_property_read_u8(const struct fwnode_handle *fwnode,
255 return fwnode_property_read_u8_array(fwnode, propname, val, 1);
258 static inline int fwnode_property_read_u16(const struct fwnode_handle *fwnode,
261 return fwnode_property_read_u16_array(fwnode, propname, val, 1);
264 static inline int fwnode_property_read_u32(const struct fwnode_handle *fwnode,
267 return fwnode_property_read_u32_array(fwnode, propname, val, 1);
270 static inline int fwnode_property_read_u64(const struct fwnode_handle *fwnode,
273 return fwnode_property_read_u64_array(fwnode, propname, val, 1);
276 static inline int fwnode_property_count_u8(const struct fwnode_handle *fwnode,
279 return fwnode_property_read_u8_array(fwnode, propname, NULL, 0);
282 static inline int fwnode_property_count_u16(const struct fwnode_handle *fwnode,
285 return fwnode_property_read_u16_array(fwnode, propname, NULL, 0);
288 static inline int fwnode_property_count_u32(const struct fwnode_handle *fwnode,
291 return fwnode_property_read_u32_array(fwnode, propname, NULL, 0);
294 static inline int fwnode_property_count_u64(const struct fwnode_handle *fwnode,
297 return fwnode_property_read_u64_array(fwnode, propname, NULL, 0);
301 fwnode_property_string_array_count(const struct fwnode_handle *fwnode,
304 return fwnode_property_read_string_array(fwnode, propname, NULL, 0);
443 int fwnode_get_phy_mode(const struct fwnode_handle *fwnode);
445 void __iomem *fwnode_iomap(struct fwnode_handle *fwnode, int index);
448 const struct fwnode_handle *fwnode, struct fwnode_handle *prev);
450 fwnode_graph_get_port_parent(const struct fwnode_handle *fwnode);
452 const struct fwnode_handle *fwnode);
454 const struct fwnode_handle *fwnode);
456 const struct fwnode_handle *fwnode);
458 static inline bool fwnode_graph_is_endpoint(const struct fwnode_handle *fwnode)
460 return fwnode_property_present(fwnode, "remote-endpoint");
478 fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
480 unsigned int fwnode_graph_get_endpoint_count(const struct fwnode_handle *fwnode,
483 #define fwnode_graph_for_each_endpoint(fwnode, child) \
484 for (child = fwnode_graph_get_next_endpoint(fwnode, NULL); child; \
485 child = fwnode_graph_get_next_endpoint(fwnode, child))
487 int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
490 typedef void *(*devcon_match_fn_t)(const struct fwnode_handle *fwnode, const char *id,
493 void *fwnode_connection_find_match(const struct fwnode_handle *fwnode,
504 int fwnode_connection_find_matches(const struct fwnode_handle *fwnode,
510 /* Software fwnode support - when HW description is incomplete or missing */
531 bool is_software_node(const struct fwnode_handle *fwnode);
533 to_software_node(const struct fwnode_handle *fwnode);
549 void fwnode_remove_software_node(struct fwnode_handle *fwnode);