Lines Matching full:supplier
62 * @sup: Supplier end of the link.
93 link->supplier = sup; in fwnode_link_add()
117 link->consumer, link->supplier); in __fwnode_link_del()
124 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
125 * @fwnode: fwnode whose supplier links need to be deleted
127 * Deletes all supplier links connecting directly to @fwnode.
316 struct device *supplier) in device_link_init_status() argument
318 switch (supplier->links.status) { in device_link_init_status()
323 * A consumer driver can create a link to a supplier in device_link_init_status()
325 * knows that the supplier is already functional (for in device_link_init_status()
327 * supplier). in device_link_init_status()
427 output = "supplier unbinding"; in status_show()
445 output = "supplier unbind"; in auto_remove_on_show()
494 * in __driver_probe_device(). In that case, drop the supplier's in device_link_release_fn()
499 pm_runtime_put_noidle(link->supplier); in device_link_release_fn()
501 pm_request_idle(link->supplier); in device_link_release_fn()
504 put_device(link->supplier); in device_link_release_fn()
516 * supplier devices get deleted when it runs, so put it into the "long" in devlink_dev_release()
535 struct device *sup = link->supplier; in devlink_add_symlinks()
542 len += strlen("supplier:") + 1; in devlink_add_symlinks()
547 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); in devlink_add_symlinks()
560 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_add_symlinks()
573 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_add_symlinks()
584 struct device *sup = link->supplier; in devlink_remove_symlinks()
589 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_remove_symlinks()
594 len += strlen("supplier:") + 1; in devlink_remove_symlinks()
602 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_remove_symlinks()
644 * @supplier: Supplier end of the link.
650 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
666 * after unbinding the consumer or supplier driver, respectively, from its
669 * the consumer or the supplier) is unregistered.
675 * driver after successfully binding a driver to the supplier device.
680 * However, if a device link between the given @consumer and @supplier pair
693 * The supplier device is required to be registered when this function is called
698 struct device *supplier, u32 flags) in device_link_add() argument
702 if (!consumer || !supplier || consumer == supplier || in device_link_add()
713 if (pm_runtime_get_sync(supplier) < 0) { in device_link_add()
714 pm_runtime_put_noidle(supplier); in device_link_add()
726 * If the supplier has not been fully registered yet or there is a in device_link_add()
728 * the supplier already in the graph, return NULL. If the link is a in device_link_add()
732 if (!device_pm_initialized(supplier) in device_link_add()
734 device_is_dependent(consumer, supplier))) { in device_link_add()
758 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
804 device_link_init_status(link, consumer, supplier); in device_link_add()
821 get_device(supplier); in device_link_add()
822 link->supplier = supplier; in device_link_add()
833 dev_bus_name(supplier), dev_name(supplier), in device_link_add()
852 device_link_init_status(link, consumer, supplier); in device_link_add()
856 * resume the supplier even without DL_FLAG_RPM_ACTIVE. in device_link_add()
860 pm_runtime_resume(supplier); in device_link_add()
862 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
868 dev_name(supplier)); in device_link_add()
882 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
889 pm_runtime_put(supplier); in device_link_add()
900 dev_name(link->supplier)); in __device_link_del()
938 * @supplier: Supplier end of the link.
943 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
947 if (WARN_ON(consumer == supplier)) in device_link_remove()
952 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
971 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
987 * device_links_check_suppliers - Check presence of supplier drivers.
994 * We need to guarantee that the supplier will not go away after the check has
997 * mark the link as "consumer probe in progress" to make the supplier removal
1009 * Device waiting for supplier to become available is not allowed to in device_links_check_suppliers()
1017 c_hook)->supplier; in device_links_check_suppliers()
1021 "wait for supplier %pfwP\n", sup_fw); in device_links_check_suppliers()
1041 !link->supplier->can_match) { in device_links_check_suppliers()
1048 "supplier %s not ready\n", in device_links_check_suppliers()
1049 dev_name(link->supplier)); in device_links_check_suppliers()
1218 * supplier before it's bound to the driver. We still want the device link
1222 * supplier device links and checks if the supplier is bound. If it is, then
1290 * probe" state to start with if the supplier is still probing in device_links_driver_bound()
1311 struct device *supplier; in device_links_driver_bound() local
1316 supplier = link->supplier; in device_links_driver_bound()
1327 !link->supplier->can_match) { in device_links_driver_bound()
1333 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1344 * device link that was preventing the supplier from getting a in device_links_driver_bound()
1348 __device_links_supplier_defer_sync(supplier); in device_links_driver_bound()
1350 __device_links_queue_sync_state(supplier, &sync_list); in device_links_driver_bound()
1367 * unless they already are in the "supplier unbind in progress" state in which
1389 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1485 * state to "supplier unbind" to prevent the consumer from being probed
1525 * If that's not the case, change the status of the link to "supplier unbind"
1680 dev_name(link->supplier)); in fw_devlink_relax_link()
1687 if (!link->supplier->can_match) in fw_devlink_no_driver()
1710 * probing because they are waiting on a optional supplier that doesn't have a
1724 * device where the supplier hasn't yet probed successfully because they have to
1731 * waited for their optional supplier to probe (when the supplier's module is
1815 * @sup_handle: fwnode handle of supplier
1819 * @con and the supplier device represented by @sup_handle.
1821 * The supplier has to be provided as a fwnode because incorrect cycles in
1822 * fwnode links can sometimes cause the supplier device to never be created.
1824 * device link from the consumer to a missing supplier.
1839 * In some cases, a device P might also be a supplier to its child node in fw_devlink_create_devlink()
1851 * supplier of C as that would delay the probe of C. in fw_devlink_create_devlink()
1862 * supplier device indefinitely. in fw_devlink_create_devlink()
1889 /* Supplier that's already initialized without a struct device. */ in fw_devlink_create_devlink()
1902 * If we can't find the supplier device from its fwnode, it might be in fw_devlink_create_devlink()
1907 * If the supplier's parent is dependent on the consumer, then the in fw_devlink_create_devlink()
1908 * consumer and supplier have a cyclic dependency. Since fw_devlink in fw_devlink_create_devlink()
1913 * the supplier as an invalid dependency. in fw_devlink_create_devlink()
1941 * links between the consumer device and @dev (supplier).
1944 * SYNC_STATE_ONLY link between @dev (supplier) and the closest ancestor device
1949 * Once device links are created from the real consumer to @dev (supplier), the
1967 * the supplier device. This is necessary to make sure the in __fw_devlink_link_to_consumers()
1968 * supplier doesn't get a sync_state() callback before the real in __fw_devlink_link_to_consumers()
1969 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
1972 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
1978 * parent of the supplier, don't create a in __fw_devlink_link_to_consumers()
1979 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2009 * This function looks at all the supplier fwnodes of fwnode tree rooted at
2011 * supplier devices of the entire fwnode tree at @fwnode.
2016 * this function is called recursively on those supplier devices. This is
2028 * between the real consumer and supplier devices.
2046 struct fwnode_handle *sup = link->supplier; in __fw_devlink_link_to_suppliers()
2059 * If a device link was successfully created to a supplier, we in __fw_devlink_link_to_suppliers()
2060 * now need to try and link the supplier to all its suppliers. in __fw_devlink_link_to_suppliers()
2079 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3502 * this device (supplier) to be added so that they can create a device in device_add()
3506 * requires the supplier be registered before it's called. in device_add()
3522 * case the consumer device is able to operate without this supplier. in device_add()