Lines Matching refs:fwnode
84 struct fwnode_handle *fwnode; member
115 struct fwnode_handle *(*get)(struct fwnode_handle *fwnode);
116 void (*put)(struct fwnode_handle *fwnode);
117 bool (*device_is_available)(const struct fwnode_handle *fwnode);
118 const void *(*device_get_match_data)(const struct fwnode_handle *fwnode,
120 bool (*property_present)(const struct fwnode_handle *fwnode,
122 int (*property_read_int_array)(const struct fwnode_handle *fwnode,
130 const char *(*get_name)(const struct fwnode_handle *fwnode);
131 const char *(*get_name_prefix)(const struct fwnode_handle *fwnode);
132 struct fwnode_handle *(*get_parent)(const struct fwnode_handle *fwnode);
134 (*get_next_child_node)(const struct fwnode_handle *fwnode,
137 (*get_named_child_node)(const struct fwnode_handle *fwnode,
139 int (*get_reference_args)(const struct fwnode_handle *fwnode,
144 (*graph_get_next_endpoint)(const struct fwnode_handle *fwnode,
147 (*graph_get_remote_endpoint)(const struct fwnode_handle *fwnode);
149 (*graph_get_port_parent)(struct fwnode_handle *fwnode);
150 int (*graph_parse_endpoint)(const struct fwnode_handle *fwnode,
152 int (*add_links)(struct fwnode_handle *fwnode);
155 #define fwnode_has_op(fwnode, op) \ argument
156 (!IS_ERR_OR_NULL(fwnode) && (fwnode)->ops && (fwnode)->ops->op)
158 #define fwnode_call_int_op(fwnode, op, ...) \ argument
159 (fwnode_has_op(fwnode, op) ? \
160 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : (IS_ERR_OR_NULL(fwnode) ? -EINVAL : -ENXIO))
162 #define fwnode_call_bool_op(fwnode, op, ...) \ argument
163 (fwnode_has_op(fwnode, op) ? \
164 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false)
166 #define fwnode_call_ptr_op(fwnode, op, ...) \ argument
167 (fwnode_has_op(fwnode, op) ? \
168 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL)
169 #define fwnode_call_void_op(fwnode, op, ...) \ argument
171 if (fwnode_has_op(fwnode, op)) \
172 (fwnode)->ops->op(fwnode, ## __VA_ARGS__); \
174 #define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev) argument
176 static inline void fwnode_init(struct fwnode_handle *fwnode, in fwnode_init() argument
179 fwnode->ops = ops; in fwnode_init()
180 INIT_LIST_HEAD(&fwnode->consumers); in fwnode_init()
181 INIT_LIST_HEAD(&fwnode->suppliers); in fwnode_init()
184 static inline void fwnode_dev_initialized(struct fwnode_handle *fwnode, in fwnode_dev_initialized() argument
187 if (IS_ERR_OR_NULL(fwnode)) in fwnode_dev_initialized()
191 fwnode->flags |= FWNODE_FLAG_INITIALIZED; in fwnode_dev_initialized()
193 fwnode->flags &= ~FWNODE_FLAG_INITIALIZED; in fwnode_dev_initialized()
199 void fwnode_links_purge(struct fwnode_handle *fwnode);
200 void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode);