Lines Matching defs:fwnode

15 #include <linux/fwnode.h>
776 * The fwnode add_links callback is expected to return 0 if it has found and
790 int ret = fwnode_call_int_op(dev->fwnode, add_links, dev);
1485 * The device's fwnode not having add_links() doesn't affect if other
1489 if (!fwnode_has_op(dev->fwnode, add_links))
1499 fw_ret = fwnode_call_int_op(dev->fwnode, add_links, dev);
1522 * fw_devlink_pause - Pause parsing of fwnode to create device links
1524 * Calling this function defers any fwnode parsing to create device links until
1529 * - Any device that is added won't have its fwnode parsed to create device
1551 * will only need one parsing of its fwnode because it is guaranteed to find
1554 * find in the first parse of the fwnode. So, we'll only need O(N) fwnode
1559 * guaranteed to trigger a parse of the fwnode of every device added before
1560 * it. This O(N^2) parse is made worse by the fact that when a fwnode of a
1571 /** fw_devlink_resume - Resume parsing of fwnode to create device links
2994 if (dev->fwnode && !dev->fwnode->dev) {
2995 dev->fwnode->dev = dev;
3144 if (dev->fwnode && dev->fwnode->dev == dev)
3145 dev->fwnode->dev = NULL;
4313 static inline bool fwnode_is_primary(struct fwnode_handle *fwnode)
4315 return fwnode && !IS_ERR(fwnode->secondary);
4321 * @fwnode: New primary firmware node of the device.
4323 * Set the device's firmware node pointer to @fwnode, but if a secondary
4326 void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
4329 struct fwnode_handle *fn = dev->fwnode;
4331 if (fwnode) {
4336 WARN_ON(fwnode->secondary);
4337 fwnode->secondary = fn;
4339 dev->fwnode = fwnode;
4342 dev->fwnode = fn->secondary;
4343 if (!(parent && fn == parent->fwnode))
4346 dev->fwnode = NULL;
4355 * @fwnode: New secondary firmware node of the device.
4358 * pointer to @fwnode. Otherwise, set the device's firmware node pointer to
4359 * @fwnode.
4361 void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
4363 if (fwnode)
4364 fwnode->secondary = ERR_PTR(-ENODEV);
4366 if (fwnode_is_primary(dev->fwnode))
4367 dev->fwnode->secondary = fwnode;
4369 dev->fwnode = fwnode;
4389 void device_set_node(struct device *dev, struct fwnode_handle *fwnode)
4391 dev->fwnode = fwnode;
4392 dev->of_node = to_of_node(fwnode);
4408 int device_match_fwnode(struct device *dev, const void *fwnode)
4410 return dev_fwnode(dev) == fwnode;