Lines Matching full:supplier
57 * @sup: Supplier end of the link.
88 link->supplier = sup; in fwnode_link_add()
102 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
103 * @fwnode: fwnode whose supplier links need to be deleted
105 * Deletes all supplier links connecting directly to @fwnode.
299 struct device *supplier) in device_link_init_status() argument
301 switch (supplier->links.status) { in device_link_init_status()
306 * A consumer driver can create a link to a supplier in device_link_init_status()
308 * knows that the supplier is already functional (for in device_link_init_status()
310 * supplier). in device_link_init_status()
410 output = "supplier unbinding"; in status_show()
428 output = "supplier unbind"; in auto_remove_on_show()
474 pm_request_idle(link->supplier); in device_link_release_fn()
477 put_device(link->supplier); in device_link_release_fn()
489 * supplier devices get deleted when it runs, so put it into the "long" in devlink_dev_release()
508 struct device *sup = link->supplier; in devlink_add_symlinks()
515 len += strlen("supplier:") + 1; in devlink_add_symlinks()
520 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); in devlink_add_symlinks()
533 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_add_symlinks()
546 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_add_symlinks()
557 struct device *sup = link->supplier; in devlink_remove_symlinks()
562 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_remove_symlinks()
567 len += strlen("supplier:") + 1; in devlink_remove_symlinks()
575 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_remove_symlinks()
617 * @supplier: Supplier end of the link.
623 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
639 * after unbinding the consumer or supplier driver, respectively, from its
642 * the consumer or the supplier) is unregistered.
648 * driver after successfully binding a driver to the supplier device.
653 * However, if a device link between the given @consumer and @supplier pair
666 * The supplier device is required to be registered when this function is called
671 struct device *supplier, u32 flags) in device_link_add() argument
675 if (!consumer || !supplier || consumer == supplier || in device_link_add()
686 if (pm_runtime_get_sync(supplier) < 0) { in device_link_add()
687 pm_runtime_put_noidle(supplier); in device_link_add()
699 * If the supplier has not been fully registered yet or there is a in device_link_add()
701 * the supplier already in the graph, return NULL. If the link is a in device_link_add()
705 if (!device_pm_initialized(supplier) in device_link_add()
707 device_is_dependent(consumer, supplier))) { in device_link_add()
731 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
777 device_link_init_status(link, consumer, supplier); in device_link_add()
794 get_device(supplier); in device_link_add()
795 link->supplier = supplier; in device_link_add()
806 dev_bus_name(supplier), dev_name(supplier), in device_link_add()
825 device_link_init_status(link, consumer, supplier); in device_link_add()
829 * resume the supplier even without DL_FLAG_RPM_ACTIVE. in device_link_add()
833 pm_runtime_resume(supplier); in device_link_add()
835 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
841 dev_name(supplier)); in device_link_add()
855 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
862 pm_runtime_put(supplier); in device_link_add()
873 dev_name(link->supplier)); in __device_link_del()
909 * @supplier: Supplier end of the link.
914 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
918 if (WARN_ON(consumer == supplier)) in device_link_remove()
923 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
942 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
952 * device_links_check_suppliers - Check presence of supplier drivers.
959 * We need to guarantee that the supplier will not go away after the check has
962 * mark the link as "consumer probe in progress" to make the supplier removal
973 * Device waiting for supplier to become available is not allowed to in device_links_check_suppliers()
979 dev_dbg(dev, "probe deferral - wait for supplier %pfwP\n", in device_links_check_suppliers()
982 c_hook)->supplier); in device_links_check_suppliers()
997 dev_dbg(dev, "probe deferral - supplier %s not ready\n", in device_links_check_suppliers()
998 dev_name(link->supplier)); in device_links_check_suppliers()
1203 * probe" state to start with if the supplier is still probing in device_links_driver_bound()
1224 struct device *supplier; in device_links_driver_bound() local
1229 supplier = link->supplier; in device_links_driver_bound()
1245 * device link that was preventing the supplier from getting a in device_links_driver_bound()
1249 __device_links_supplier_defer_sync(supplier); in device_links_driver_bound()
1251 __device_links_queue_sync_state(supplier, &sync_list); in device_links_driver_bound()
1268 * unless they already are in the "supplier unbind in progress" state in which
1290 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1386 * state to "supplier unbind" to prevent the consumer from being probed
1426 * If that's not the case, change the status of the link to "supplier unbind"
1612 dev_name(link->supplier)); in fw_devlink_relax_cycle()
1620 * @sup_handle - fwnode handle of supplier
1623 * @con and the supplier device represented by @sup_handle.
1625 * The supplier has to be provided as a fwnode because incorrect cycles in
1626 * fwnode links can sometimes cause the supplier device to never be created.
1628 * device link from the consumer to a missing supplier.
1647 * supplier device indefinitely. in fw_devlink_create_devlink()
1674 /* Supplier that's already initialized without a struct device. */ in fw_devlink_create_devlink()
1687 * If we can't find the supplier device from its fwnode, it might be in fw_devlink_create_devlink()
1692 * If the supplier's parent is dependent on the consumer, then the in fw_devlink_create_devlink()
1693 * consumer and supplier have a cyclic dependency. Since fw_devlink in fw_devlink_create_devlink()
1698 * the supplier as an invalid dependency. in fw_devlink_create_devlink()
1726 * links between the consumer device and @dev (supplier).
1729 * SYNC_STATE_ONLY link between @dev (supplier) and the closest ancestor device
1734 * Once device links are created from the real consumer to @dev (supplier), the
1752 * the supplier device. This is necessary to make sure the in __fw_devlink_link_to_consumers()
1753 * supplier doesn't get a sync_state() callback before the real in __fw_devlink_link_to_consumers()
1754 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
1757 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
1763 * parent of the supplier, don't create a in __fw_devlink_link_to_consumers()
1764 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
1796 * This function looks at all the supplier fwnodes of fwnode tree rooted at
1798 * supplier devices of the entire fwnode tree at @fwnode.
1803 * this function is called recursively on those supplier devices. This is
1815 * between the real consumer and supplier devices.
1833 struct fwnode_handle *sup = link->supplier; in __fw_devlink_link_to_suppliers()
1848 * If a device link was successfully created to a supplier, we in __fw_devlink_link_to_suppliers()
1849 * now need to try and link the supplier to all its suppliers. in __fw_devlink_link_to_suppliers()
1868 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3233 * this device (supplier) to be added so that they can create a device in device_add()
3237 * requires the supplier be registered before it's called. in device_add()