Lines Matching defs:supplier
80 link->supplier = sup;
113 link->consumer, link->supplier);
128 link->consumer, link->supplier);
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.
335 struct device *supplier)
337 switch (supplier->links.status) {
342 * A consumer driver can create a link to a supplier
344 * knows that the supplier is already functional (for
346 * supplier).
445 output = "supplier unbinding";
463 output = "supplier unbind";
512 * in __driver_probe_device(). In that case, drop the supplier's
517 pm_runtime_put_noidle(link->supplier);
519 pm_request_idle(link->supplier);
522 put_device(link->supplier);
534 * supplier devices get deleted when it runs, so put it into the "long"
551 struct device *sup = link->supplier;
558 len += strlen("supplier:") + 1;
563 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier");
576 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup));
589 sysfs_remove_link(&link->link_dev.kobj, "supplier");
599 struct device *sup = link->supplier;
604 sysfs_remove_link(&link->link_dev.kobj, "supplier");
609 len += strlen("supplier:") + 1;
617 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup));
660 * @supplier: Supplier end of the link.
666 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
682 * after unbinding the consumer or supplier driver, respectively, from its
685 * the consumer or the supplier) is unregistered.
691 * driver after successfully binding a driver to the supplier device.
696 * However, if a device link between the given @consumer and @supplier pair
709 * The supplier device is required to be registered when this function is called
714 struct device *supplier, u32 flags)
718 if (!consumer || !supplier || consumer == supplier ||
727 if (pm_runtime_get_sync(supplier) < 0) {
728 pm_runtime_put_noidle(supplier);
744 * If the supplier has not been fully registered yet or there is a
746 * the supplier already in the graph, return NULL. If the link is a
750 if (!device_pm_initialized(supplier)
752 device_is_dependent(consumer, supplier))) {
776 list_for_each_entry(link, &supplier->links.consumers, s_node) {
822 device_link_init_status(link, consumer, supplier);
839 get_device(supplier);
840 link->supplier = supplier;
851 dev_bus_name(supplier), dev_name(supplier),
870 device_link_init_status(link, consumer, supplier);
874 * resume the supplier even without DL_FLAG_RPM_ACTIVE.
878 pm_runtime_resume(supplier);
880 list_add_tail_rcu(&link->s_node, &supplier->links.consumers);
886 dev_name(supplier));
900 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
907 pm_runtime_put(supplier);
918 dev_name(link->supplier));
956 * @supplier: Supplier end of the link.
961 void device_link_remove(void *consumer, struct device *supplier)
965 if (WARN_ON(consumer == supplier))
970 list_for_each_entry(link, &supplier->links.consumers, s_node) {
989 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
1014 return link->supplier;
1020 * device_links_check_suppliers - Check presence of supplier drivers.
1027 * We need to guarantee that the supplier will not go away after the check has
1030 * mark the link as "consumer probe in progress" to make the supplier removal
1042 * Device waiting for supplier to become available is not allowed to
1051 "wait for supplier %pfwf\n", sup_fw);
1071 !link->supplier->can_match) {
1078 "supplier %s not ready\n",
1079 dev_name(link->supplier));
1247 * supplier before it's bound to the driver. We still want the device link
1251 * supplier device links and checks if the supplier is bound. If it is, then
1300 * device the fallback supplier to the dangling consumers of the child
1326 * probe" state to start with if the supplier is still probing
1347 struct device *supplier;
1352 supplier = link->supplier;
1363 !link->supplier->can_match) {
1369 * (consumer probed before supplier). So delete it.
1380 * device link that was preventing the supplier from getting a
1384 __device_links_supplier_defer_sync(supplier);
1386 __device_links_queue_sync_state(supplier, &sync_list);
1403 * unless they already are in the "supplier unbind in progress" state in which
1425 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
1521 * state to "supplier unbind" to prevent the consumer from being probed
1561 * If that's not the case, change the status of the link to "supplier unbind"
1744 dev_name(link->supplier));
1751 if (!link->supplier->can_match)
1769 struct device *sup = link->supplier;
1812 * probing because they are waiting on a optional supplier that doesn't have a
1826 * device where the supplier hasn't yet probed successfully because they have to
1833 * waited for their optional supplier to probe (when the supplier's module is
1906 * @sup_handle: Potential supplier's fwnode.
1963 if (__fw_devlink_relax_cycles(con, link->supplier)) {
1994 dev_link->supplier->fwnode)) {
2011 * @sup_handle: fwnode handle of supplier
2015 * @con and the supplier device represented by @sup_handle.
2017 * The supplier has to be provided as a fwnode because incorrect cycles in
2018 * fwnode links can sometimes cause the supplier device to never be created.
2020 * device link from the consumer to a missing supplier.
2042 * In some cases, a device P might also be a supplier to its child node
2054 * supplier of C as that would delay the probe of C.
2065 * is because the consumer and supplier might be part of multiple cycles
2089 * supplier device indefinitely.
2110 * Supplier or supplier's ancestor already initialized without a struct
2131 * links between the consumer device and @dev (supplier).
2134 * SYNC_STATE_ONLY link between @dev (supplier) and the closest ancestor device
2139 * Once device links are created from the real consumer to @dev (supplier), the
2156 * the supplier device. This is necessary to make sure the
2157 * supplier doesn't get a sync_state() callback before the real
2158 * consumer can create a device link to the supplier.
2161 * consumer's parent device is added before the supplier.
2167 * parent of the supplier, don't create a
2168 * consumer-supplier link from the parent to its child
2197 * This function looks at all the supplier fwnodes of fwnode tree rooted at
2199 * supplier devices of the entire fwnode tree at @fwnode.
2213 * between the real consumer and supplier devices.
2224 struct fwnode_handle *sup = link->supplier;
2236 * case where the supplier is added before the consumer's parent device
3616 * this device (supplier) to be added so that they can create a device
3620 * requires the supplier be registered before it's called.
3636 * case the consumer device is able to operate without this supplier.