Lines Matching full:supplier
53 * @sup: Supplier end of the link.
83 link->supplier = sup; in __fwnode_link_add()
114 link->consumer, link->supplier); in __fwnode_link_del()
129 link->consumer, link->supplier); in __fwnode_link_cycle()
134 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
135 * @fwnode: fwnode whose supplier links need to be deleted
137 * Deletes all supplier links connecting directly to @fwnode.
214 * @new_sup: fwnode of new supplier
221 * Otherwise, move its consumers to the new supplier @new_sup.
336 struct device *supplier) in device_link_init_status() argument
338 switch (supplier->links.status) { in device_link_init_status()
343 * A consumer driver can create a link to a supplier in device_link_init_status()
345 * knows that the supplier is already functional (for in device_link_init_status()
347 * supplier). in device_link_init_status()
446 output = "supplier unbinding"; in status_show()
464 output = "supplier unbind"; in auto_remove_on_show()
513 * in __driver_probe_device(). In that case, drop the supplier's in device_link_release_fn()
518 pm_runtime_put_noidle(link->supplier); in device_link_release_fn()
520 pm_request_idle(link->supplier); in device_link_release_fn()
523 put_device(link->supplier); in device_link_release_fn()
535 * supplier devices get deleted when it runs, so put it into the in devlink_dev_release()
566 struct device *sup = link->supplier; in devlink_add_symlinks()
569 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); in devlink_add_symlinks()
587 buf_sup = kasprintf(GFP_KERNEL, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_add_symlinks()
604 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_add_symlinks()
613 struct device *sup = link->supplier; in devlink_remove_symlinks()
617 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_remove_symlinks()
620 buf_sup = kasprintf(GFP_KERNEL, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_remove_symlinks()
672 * @supplier: Supplier end of the link.
681 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
697 * after unbinding the consumer or supplier driver, respectively, from its
700 * the consumer or the supplier) is unregistered.
706 * driver after successfully binding a driver to the supplier device.
711 * However, if a device link between the given @consumer and @supplier pair
724 * The supplier device is required to be registered when this function is called
729 struct device *supplier, u32 flags) in device_link_add() argument
733 if (!consumer || !supplier || consumer == supplier || in device_link_add()
742 if (pm_runtime_get_sync(supplier) < 0) { in device_link_add()
743 pm_runtime_put_noidle(supplier); in device_link_add()
759 * If the supplier has not been fully registered yet or there is a in device_link_add()
761 * the supplier already in the graph, return NULL. If the link is a in device_link_add()
765 if (!device_pm_initialized(supplier) in device_link_add()
767 device_is_dependent(consumer, supplier))) { in device_link_add()
791 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
837 device_link_init_status(link, consumer, supplier); in device_link_add()
854 get_device(supplier); in device_link_add()
855 link->supplier = supplier; in device_link_add()
866 dev_bus_name(supplier), dev_name(supplier), in device_link_add()
885 device_link_init_status(link, consumer, supplier); in device_link_add()
889 * resume the supplier even without DL_FLAG_RPM_ACTIVE. in device_link_add()
893 pm_runtime_resume(supplier); in device_link_add()
895 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
901 dev_name(supplier)); in device_link_add()
915 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
922 pm_runtime_put(supplier); in device_link_add()
933 dev_name(link->supplier)); in __device_link_del()
971 * @supplier: Supplier end of the link.
976 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
980 if (WARN_ON(consumer == supplier)) in device_link_remove()
985 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
1004 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
1030 return link->supplier; in fwnode_links_check_suppliers()
1036 * device_links_check_suppliers - Check presence of supplier drivers.
1043 * We need to guarantee that the supplier will not go away after the check has
1046 * mark the link as "consumer probe in progress" to make the supplier removal
1058 * Device waiting for supplier to become available is not allowed to in device_links_check_suppliers()
1068 "wait for supplier %pfwf\n", sup_fw); in device_links_check_suppliers()
1083 !link->supplier->can_match) { in device_links_check_suppliers()
1090 "supplier %s not ready\n", dev_name(link->supplier)); in device_links_check_suppliers()
1256 * supplier before it's bound to the driver. We still want the device link
1260 * supplier device links and checks if the supplier is bound. If it is, then
1309 * device the fallback supplier to the dangling consumers of the child in device_links_driver_bound()
1337 * probe" state to start with if the supplier is still probing in device_links_driver_bound()
1358 struct device *supplier; in device_links_driver_bound() local
1363 supplier = link->supplier; in device_links_driver_bound()
1374 !link->supplier->can_match) { in device_links_driver_bound()
1380 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1391 * device link that was preventing the supplier from getting a in device_links_driver_bound()
1395 __device_links_supplier_defer_sync(supplier); in device_links_driver_bound()
1397 __device_links_queue_sync_state(supplier, &sync_list); in device_links_driver_bound()
1414 * unless they already are in the "supplier unbind in progress" state in which
1436 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1532 * state to "supplier unbind" to prevent the consumer from being probed
1572 * If that's not the case, change the status of the link to "supplier unbind"
1755 dev_name(link->supplier)); in fw_devlink_relax_link()
1762 if (!link->supplier->can_match) in fw_devlink_no_driver()
1780 struct device *sup = link->supplier; in fw_devlink_dev_sync_state()
1823 * probing because they are waiting on a optional supplier that doesn't have a
1837 * device where the supplier hasn't yet probed successfully because they have to
1844 * waited for their optional supplier to probe (when the supplier's module is
1975 * @sup_handle: Potential supplier's fwnode.
2036 if (__fw_devlink_relax_cycles(con, link->supplier)) { in __fw_devlink_relax_cycles()
2070 dev_link->supplier->fwnode)) { in __fw_devlink_relax_cycles()
2072 dev_link->supplier->fwnode); in __fw_devlink_relax_cycles()
2089 * @sup_handle: fwnode handle of supplier
2093 * @con and the supplier device represented by @sup_handle.
2095 * The supplier has to be provided as a fwnode because incorrect cycles in
2096 * fwnode links can sometimes cause the supplier device to never be created.
2098 * device link from the consumer to a missing supplier.
2123 * In some cases, a device P might also be a supplier to its child node in fw_devlink_create_devlink()
2135 * supplier of C as that would delay the probe of C. in fw_devlink_create_devlink()
2146 * is because the consumer and supplier might be part of multiple cycles in fw_devlink_create_devlink()
2171 * supplier device indefinitely. in fw_devlink_create_devlink()
2192 * Supplier or supplier's ancestor already initialized without a struct in fw_devlink_create_devlink()
2213 * links between the consumer device and @dev (supplier).
2216 * SYNC_STATE_ONLY link between @dev (supplier) and the closest ancestor device
2221 * Once device links are created from the real consumer to @dev (supplier), the
2238 * the supplier device. This is necessary to make sure the in __fw_devlink_link_to_consumers()
2239 * supplier doesn't get a sync_state() callback before the real in __fw_devlink_link_to_consumers()
2240 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
2243 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
2249 * parent of the supplier, don't create a in __fw_devlink_link_to_consumers()
2250 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2279 * This function looks at all the supplier fwnodes of fwnode tree rooted at
2281 * supplier devices of the entire fwnode tree at @fwnode.
2295 * between the real consumer and supplier devices.
2306 struct fwnode_handle *sup = link->supplier; in __fw_devlink_link_to_suppliers()
2318 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3657 * this device (supplier) to be added so that they can create a device in device_add()
3661 * requires the supplier be registered before it's called. in device_add()
3677 * case the consumer device is able to operate without this supplier. in device_add()