Lines Matching refs:fwnode

3  * fwnode.h - Firmware device node object handle type definition.
27 * fwnode flags
29 * LINKS_ADDED: The fwnode has already be parsed to add fwnode links.
30 * NOT_DEVICE: The fwnode will never be populated as a struct device.
31 * INITIALIZED: The hardware corresponding to fwnode has been initialized.
32 * NEEDS_CHILD_BOUND_ON_ADD: For this fwnode/device to probe successfully, its
36 * BEST_EFFORT: The fwnode/device needs to probe early and might be missing some
59 * fwnode link flags
61 * CYCLE: The fwnode link is part of a cycle. Don't defer probe.
79 * @local_fwnode: reference to the related fwnode
98 * @fwnode:- A reference to the base fwnode
100 * @args: Integer arguments on the fwnode
103 struct fwnode_handle *fwnode;
109 * struct fwnode_operations - Operations for fwnode interface
110 * @get: Get a reference to an fwnode.
111 * @put: Put a reference to an fwnode.
119 * @get_name: Return the name of an fwnode.
121 * @get_parent: Return the parent of an fwnode.
130 * @add_links: Create fwnode links to all the suppliers of the fwnode. Return
134 struct fwnode_handle *(*get)(struct fwnode_handle *fwnode);
135 void (*put)(struct fwnode_handle *fwnode);
136 bool (*device_is_available)(const struct fwnode_handle *fwnode);
137 const void *(*device_get_match_data)(const struct fwnode_handle *fwnode,
139 bool (*device_dma_supported)(const struct fwnode_handle *fwnode);
141 (*device_get_dma_attr)(const struct fwnode_handle *fwnode);
142 bool (*property_present)(const struct fwnode_handle *fwnode,
144 int (*property_read_int_array)(const struct fwnode_handle *fwnode,
152 const char *(*get_name)(const struct fwnode_handle *fwnode);
153 const char *(*get_name_prefix)(const struct fwnode_handle *fwnode);
154 struct fwnode_handle *(*get_parent)(const struct fwnode_handle *fwnode);
156 (*get_next_child_node)(const struct fwnode_handle *fwnode,
159 (*get_named_child_node)(const struct fwnode_handle *fwnode,
161 int (*get_reference_args)(const struct fwnode_handle *fwnode,
166 (*graph_get_next_endpoint)(const struct fwnode_handle *fwnode,
169 (*graph_get_remote_endpoint)(const struct fwnode_handle *fwnode);
171 (*graph_get_port_parent)(struct fwnode_handle *fwnode);
172 int (*graph_parse_endpoint)(const struct fwnode_handle *fwnode,
174 void __iomem *(*iomap)(struct fwnode_handle *fwnode, int index);
175 int (*irq_get)(const struct fwnode_handle *fwnode, unsigned int index);
176 int (*add_links)(struct fwnode_handle *fwnode);
179 #define fwnode_has_op(fwnode, op) \
180 (!IS_ERR_OR_NULL(fwnode) && (fwnode)->ops && (fwnode)->ops->op)
182 #define fwnode_call_int_op(fwnode, op, ...) \
183 (fwnode_has_op(fwnode, op) ? \
184 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : (IS_ERR_OR_NULL(fwnode) ? -EINVAL : -ENXIO))
186 #define fwnode_call_bool_op(fwnode, op, ...) \
187 (fwnode_has_op(fwnode, op) ? \
188 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false)
190 #define fwnode_call_ptr_op(fwnode, op, ...) \
191 (fwnode_has_op(fwnode, op) ? \
192 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)
193 #define fwnode_call_void_op(fwnode, op, ...) \
195 if (fwnode_has_op(fwnode, op)) \
196 (fwnode)->ops->op(fwnode, ## __VA_ARGS__); \
199 static inline void fwnode_init(struct fwnode_handle *fwnode,
202 fwnode->ops = ops;
203 INIT_LIST_HEAD(&fwnode->consumers);
204 INIT_LIST_HEAD(&fwnode->suppliers);
207 static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode,
210 if (IS_ERR_OR_NULL(fwnode))
214 fwnode->flags |= FWNODE_FLAG_INITIALIZED;
216 fwnode->flags &= ~FWNODE_FLAG_INITIALIZED;
221 void fwnode_links_purge(struct fwnode_handle *fwnode);
222 void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);