Lines Matching refs:fwnode
108 struct fwnode_handle *fwnode; member
140 struct fwnode_handle *(*get)(struct fwnode_handle *fwnode);
141 void (*put)(struct fwnode_handle *fwnode);
142 bool (*device_is_available)(const struct fwnode_handle *fwnode);
143 const void *(*device_get_match_data)(const struct fwnode_handle *fwnode,
145 bool (*device_dma_supported)(const struct fwnode_handle *fwnode);
147 (*device_get_dma_attr)(const struct fwnode_handle *fwnode);
148 bool (*property_present)(const struct fwnode_handle *fwnode,
150 bool (*property_read_bool)(const struct fwnode_handle *fwnode,
152 int (*property_read_int_array)(const struct fwnode_handle *fwnode,
160 const char *(*get_name)(const struct fwnode_handle *fwnode);
161 const char *(*get_name_prefix)(const struct fwnode_handle *fwnode);
162 struct fwnode_handle *(*get_parent)(const struct fwnode_handle *fwnode);
164 (*get_next_child_node)(const struct fwnode_handle *fwnode,
167 (*get_named_child_node)(const struct fwnode_handle *fwnode,
169 int (*get_reference_args)(const struct fwnode_handle *fwnode,
174 (*graph_get_next_endpoint)(const struct fwnode_handle *fwnode,
177 (*graph_get_remote_endpoint)(const struct fwnode_handle *fwnode);
179 (*graph_get_port_parent)(struct fwnode_handle *fwnode);
180 int (*graph_parse_endpoint)(const struct fwnode_handle *fwnode,
182 void __iomem *(*iomap)(struct fwnode_handle *fwnode, int index);
183 int (*irq_get)(const struct fwnode_handle *fwnode, unsigned int index);
184 int (*add_links)(struct fwnode_handle *fwnode);
187 #define fwnode_has_op(fwnode, op) \ argument
188 (!IS_ERR_OR_NULL(fwnode) && (fwnode)->ops && (fwnode)->ops->op)
190 #define fwnode_call_int_op(fwnode, op, ...) \ argument
191 (fwnode_has_op(fwnode, op) ? \
192 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : (IS_ERR_OR_NULL(fwnode) ? -EINVAL : -ENXIO))
194 #define fwnode_call_bool_op(fwnode, op, ...) \ argument
195 (fwnode_has_op(fwnode, op) ? \
196 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false)
198 #define fwnode_call_ptr_op(fwnode, op, ...) \ argument
199 (fwnode_has_op(fwnode, op) ? \
200 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)
201 #define fwnode_call_void_op(fwnode, op, ...) \ argument
203 if (fwnode_has_op(fwnode, op)) \
204 (fwnode)->ops->op(fwnode, ## __VA_ARGS__); \
207 static inline void fwnode_init(struct fwnode_handle *fwnode, in fwnode_init() argument
210 fwnode->ops = ops; in fwnode_init()
211 INIT_LIST_HEAD(&fwnode->consumers); in fwnode_init()
212 INIT_LIST_HEAD(&fwnode->suppliers); in fwnode_init()
215 static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode, in fwnode_dev_initialized() argument
218 if (IS_ERR_OR_NULL(fwnode)) in fwnode_dev_initialized()
222 fwnode->flags |= FWNODE_FLAG_INITIALIZED; in fwnode_dev_initialized()
224 fwnode->flags &= ~FWNODE_FLAG_INITIALIZED; in fwnode_dev_initialized()
229 void fwnode_links_purge(struct fwnode_handle *fwnode);
230 void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);