Lines Matching full:supplier
51 * @sup: Supplier end of the link.
81 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 "long" in devlink_dev_release()
552 struct device *sup = link->supplier; in devlink_add_symlinks()
559 len += strlen("supplier:") + 1; in devlink_add_symlinks()
564 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); in devlink_add_symlinks()
577 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_add_symlinks()
590 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_add_symlinks()
600 struct device *sup = link->supplier; in devlink_remove_symlinks()
605 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_remove_symlinks()
610 len += strlen("supplier:") + 1; in devlink_remove_symlinks()
618 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup)); in devlink_remove_symlinks()
661 * @supplier: Supplier end of the link.
667 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
683 * after unbinding the consumer or supplier driver, respectively, from its
686 * the consumer or the supplier) is unregistered.
692 * driver after successfully binding a driver to the supplier device.
697 * However, if a device link between the given @consumer and @supplier pair
710 * The supplier device is required to be registered when this function is called
715 struct device *supplier, u32 flags) in device_link_add() argument
719 if (!consumer || !supplier || consumer == supplier || in device_link_add()
728 if (pm_runtime_get_sync(supplier) < 0) { in device_link_add()
729 pm_runtime_put_noidle(supplier); in device_link_add()
745 * If the supplier has not been fully registered yet or there is a in device_link_add()
747 * the supplier already in the graph, return NULL. If the link is a in device_link_add()
751 if (!device_pm_initialized(supplier) in device_link_add()
753 device_is_dependent(consumer, supplier))) { in device_link_add()
777 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
823 device_link_init_status(link, consumer, supplier); in device_link_add()
840 get_device(supplier); in device_link_add()
841 link->supplier = supplier; in device_link_add()
852 dev_bus_name(supplier), dev_name(supplier), in device_link_add()
871 device_link_init_status(link, consumer, supplier); in device_link_add()
875 * resume the supplier even without DL_FLAG_RPM_ACTIVE. in device_link_add()
879 pm_runtime_resume(supplier); in device_link_add()
881 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
887 dev_name(supplier)); in device_link_add()
901 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
908 pm_runtime_put(supplier); in device_link_add()
919 dev_name(link->supplier)); in __device_link_del()
957 * @supplier: Supplier end of the link.
962 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
966 if (WARN_ON(consumer == supplier)) in device_link_remove()
971 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
990 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
1015 return link->supplier; in fwnode_links_check_suppliers()
1021 * device_links_check_suppliers - Check presence of supplier drivers.
1028 * We need to guarantee that the supplier will not go away after the check has
1031 * mark the link as "consumer probe in progress" to make the supplier removal
1043 * Device waiting for supplier to become available is not allowed to in device_links_check_suppliers()
1052 "wait for supplier %pfwf\n", sup_fw); in device_links_check_suppliers()
1072 !link->supplier->can_match) { in device_links_check_suppliers()
1079 "supplier %s not ready\n", in device_links_check_suppliers()
1080 dev_name(link->supplier)); in device_links_check_suppliers()
1248 * supplier before it's bound to the driver. We still want the device link
1252 * supplier device links and checks if the supplier is bound. If it is, then
1301 * device the fallback supplier to the dangling consumers of the child in device_links_driver_bound()
1327 * probe" state to start with if the supplier is still probing in device_links_driver_bound()
1348 struct device *supplier; in device_links_driver_bound() local
1353 supplier = link->supplier; in device_links_driver_bound()
1364 !link->supplier->can_match) { in device_links_driver_bound()
1370 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1381 * device link that was preventing the supplier from getting a in device_links_driver_bound()
1385 __device_links_supplier_defer_sync(supplier); in device_links_driver_bound()
1387 __device_links_queue_sync_state(supplier, &sync_list); in device_links_driver_bound()
1404 * unless they already are in the "supplier unbind in progress" state in which
1426 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1522 * state to "supplier unbind" to prevent the consumer from being probed
1562 * If that's not the case, change the status of the link to "supplier unbind"
1745 dev_name(link->supplier)); in fw_devlink_relax_link()
1752 if (!link->supplier->can_match) in fw_devlink_no_driver()
1770 struct device *sup = link->supplier; in fw_devlink_dev_sync_state()
1813 * probing because they are waiting on a optional supplier that doesn't have a
1827 * device where the supplier hasn't yet probed successfully because they have to
1834 * waited for their optional supplier to probe (when the supplier's module is
1907 * @sup_handle: Potential supplier's fwnode.
1965 if (__fw_devlink_relax_cycles(con, link->supplier)) { in __fw_devlink_relax_cycles()
1999 dev_link->supplier->fwnode)) { in __fw_devlink_relax_cycles()
2001 dev_link->supplier->fwnode); in __fw_devlink_relax_cycles()
2018 * @sup_handle: fwnode handle of supplier
2022 * @con and the supplier device represented by @sup_handle.
2024 * The supplier has to be provided as a fwnode because incorrect cycles in
2025 * fwnode links can sometimes cause the supplier device to never be created.
2027 * device link from the consumer to a missing supplier.
2049 * In some cases, a device P might also be a supplier to its child node in fw_devlink_create_devlink()
2061 * supplier of C as that would delay the probe of C. in fw_devlink_create_devlink()
2072 * is because the consumer and supplier might be part of multiple cycles in fw_devlink_create_devlink()
2097 * supplier device indefinitely. in fw_devlink_create_devlink()
2118 * Supplier or supplier's ancestor already initialized without a struct in fw_devlink_create_devlink()
2139 * links between the consumer device and @dev (supplier).
2142 * SYNC_STATE_ONLY link between @dev (supplier) and the closest ancestor device
2147 * Once device links are created from the real consumer to @dev (supplier), the
2164 * the supplier device. This is necessary to make sure the in __fw_devlink_link_to_consumers()
2165 * supplier doesn't get a sync_state() callback before the real in __fw_devlink_link_to_consumers()
2166 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
2169 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
2175 * parent of the supplier, don't create a in __fw_devlink_link_to_consumers()
2176 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2205 * This function looks at all the supplier fwnodes of fwnode tree rooted at
2207 * supplier devices of the entire fwnode tree at @fwnode.
2221 * between the real consumer and supplier devices.
2232 struct fwnode_handle *sup = link->supplier; in __fw_devlink_link_to_suppliers()
2244 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3624 * this device (supplier) to be added so that they can create a device in device_add()
3628 * requires the supplier be registered before it's called. in device_add()
3644 * case the consumer device is able to operate without this supplier. in device_add()