Lines Matching full:supplier

51  * @sup: Supplier end of the link.
80 link->supplier = sup; in __fwnode_link_add()
113 link->consumer, link->supplier); in __fwnode_link_del()
128 link->consumer, link->supplier); in __fwnode_link_cycle()
133 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
134 * @fwnode: fwnode whose supplier links need to be deleted
136 * Deletes all supplier links connecting directly to @fwnode.
213 * @new_sup: fwnode of new supplier
220 * Otherwise, move its consumers to the new supplier @new_sup.
333 struct device *supplier) in device_link_init_status() argument
335 switch (supplier->links.status) { in device_link_init_status()
340 * A consumer driver can create a link to a supplier in device_link_init_status()
342 * knows that the supplier is already functional (for in device_link_init_status()
344 * supplier). in device_link_init_status()
443 output = "supplier unbinding"; in status_show()
461 output = "supplier unbind"; in auto_remove_on_show()
510 * in __driver_probe_device(). In that case, drop the supplier's in device_link_release_fn()
515 pm_runtime_put_noidle(link->supplier); in device_link_release_fn()
517 pm_request_idle(link->supplier); in device_link_release_fn()
520 put_device(link->supplier); in device_link_release_fn()
532 * supplier devices get deleted when it runs, so put it into the "long" in devlink_dev_release()
549 struct device *sup = link->supplier; in devlink_add_symlinks()
556 len += strlen("supplier:") + 1; in devlink_add_symlinks()
561 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); in devlink_add_symlinks()
574 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_add_symlinks()
587 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_add_symlinks()
597 struct device *sup = link->supplier; in devlink_remove_symlinks()
602 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_remove_symlinks()
607 len += strlen("supplier:") + 1; in devlink_remove_symlinks()
615 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_remove_symlinks()
658 * @supplier: Supplier end of the link.
664 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
680 * after unbinding the consumer or supplier driver, respectively, from its
683 * the consumer or the supplier) is unregistered.
689 * driver after successfully binding a driver to the supplier device.
694 * However, if a device link between the given @consumer and @supplier pair
707 * The supplier device is required to be registered when this function is called
712 struct device *supplier, u32 flags) in device_link_add() argument
716 if (!consumer || !supplier || consumer == supplier || in device_link_add()
725 if (pm_runtime_get_sync(supplier) < 0) { in device_link_add()
726 pm_runtime_put_noidle(supplier); in device_link_add()
742 * If the supplier has not been fully registered yet or there is a in device_link_add()
744 * the supplier already in the graph, return NULL. If the link is a in device_link_add()
748 if (!device_pm_initialized(supplier) in device_link_add()
750 device_is_dependent(consumer, supplier))) { in device_link_add()
774 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
820 device_link_init_status(link, consumer, supplier); in device_link_add()
837 get_device(supplier); in device_link_add()
838 link->supplier = supplier; in device_link_add()
849 dev_bus_name(supplier), dev_name(supplier), in device_link_add()
868 device_link_init_status(link, consumer, supplier); in device_link_add()
872 * resume the supplier even without DL_FLAG_RPM_ACTIVE. in device_link_add()
876 pm_runtime_resume(supplier); in device_link_add()
878 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
884 dev_name(supplier)); in device_link_add()
898 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
905 pm_runtime_put(supplier); in device_link_add()
916 dev_name(link->supplier)); in __device_link_del()
954 * @supplier: Supplier end of the link.
959 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
963 if (WARN_ON(consumer == supplier)) in device_link_remove()
968 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
987 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
1012 return link->supplier; in fwnode_links_check_suppliers()
1018 * device_links_check_suppliers - Check presence of supplier drivers.
1025 * We need to guarantee that the supplier will not go away after the check has
1028 * mark the link as "consumer probe in progress" to make the supplier removal
1040 * Device waiting for supplier to become available is not allowed to in device_links_check_suppliers()
1049 "wait for supplier %pfwf\n", sup_fw); in device_links_check_suppliers()
1069 !link->supplier->can_match) { in device_links_check_suppliers()
1076 "supplier %s not ready\n", in device_links_check_suppliers()
1077 dev_name(link->supplier)); in device_links_check_suppliers()
1245 * supplier before it's bound to the driver. We still want the device link
1249 * supplier device links and checks if the supplier is bound. If it is, then
1298 * device the fallback supplier to the dangling consumers of the child in device_links_driver_bound()
1324 * probe" state to start with if the supplier is still probing in device_links_driver_bound()
1345 struct device *supplier; in device_links_driver_bound() local
1350 supplier = link->supplier; in device_links_driver_bound()
1361 !link->supplier->can_match) { in device_links_driver_bound()
1367 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1378 * device link that was preventing the supplier from getting a in device_links_driver_bound()
1382 __device_links_supplier_defer_sync(supplier); in device_links_driver_bound()
1384 __device_links_queue_sync_state(supplier, &sync_list); in device_links_driver_bound()
1401 * unless they already are in the "supplier unbind in progress" state in which
1423 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1519 * state to "supplier unbind" to prevent the consumer from being probed
1559 * If that's not the case, change the status of the link to "supplier unbind"
1742 dev_name(link->supplier)); in fw_devlink_relax_link()
1749 if (!link->supplier->can_match) in fw_devlink_no_driver()
1767 struct device *sup = link->supplier; in fw_devlink_dev_sync_state()
1810 * probing because they are waiting on a optional supplier that doesn't have a
1824 * device where the supplier hasn't yet probed successfully because they have to
1831 * waited for their optional supplier to probe (when the supplier's module is
1904 * @sup_handle: Potential supplier's fwnode.
1961 if (__fw_devlink_relax_cycles(con, link->supplier)) { in __fw_devlink_relax_cycles()
1992 dev_link->supplier->fwnode)) { in __fw_devlink_relax_cycles()
2009 * @sup_handle: fwnode handle of supplier
2013 * @con and the supplier device represented by @sup_handle.
2015 * The supplier has to be provided as a fwnode because incorrect cycles in
2016 * fwnode links can sometimes cause the supplier device to never be created.
2018 * device link from the consumer to a missing supplier.
2040 * In some cases, a device P might also be a supplier to its child node in fw_devlink_create_devlink()
2052 * supplier of C as that would delay the probe of C. in fw_devlink_create_devlink()
2082 * supplier device indefinitely. in fw_devlink_create_devlink()
2103 * Supplier or supplier's ancestor already initialized without a struct in fw_devlink_create_devlink()
2124 * links between the consumer device and @dev (supplier).
2127 * SYNC_STATE_ONLY link between @dev (supplier) and the closest ancestor device
2132 * Once device links are created from the real consumer to @dev (supplier), the
2149 * the supplier device. This is necessary to make sure the in __fw_devlink_link_to_consumers()
2150 * supplier doesn't get a sync_state() callback before the real in __fw_devlink_link_to_consumers()
2151 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
2154 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
2160 * parent of the supplier, don't create a in __fw_devlink_link_to_consumers()
2161 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2190 * This function looks at all the supplier fwnodes of fwnode tree rooted at
2192 * supplier devices of the entire fwnode tree at @fwnode.
2206 * between the real consumer and supplier devices.
2217 struct fwnode_handle *sup = link->supplier; in __fw_devlink_link_to_suppliers()
2229 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3609 * this device (supplier) to be added so that they can create a device in device_add()
3613 * requires the supplier be registered before it's called. in device_add()
3629 * case the consumer device is able to operate without this supplier. in device_add()