Lines Matching full:supplier
154 struct device *supplier) in device_link_init_status() argument
156 switch (supplier->links.status) { in device_link_init_status()
161 * A consumer driver can create a link to a supplier in device_link_init_status()
163 * knows that the supplier is already functional (for in device_link_init_status()
165 * supplier). in device_link_init_status()
264 output = "supplier unbinding"; in status_show()
282 output = "supplier unbind"; in auto_remove_on_show()
323 pm_runtime_put(link->supplier); in device_link_free()
326 put_device(link->supplier); in device_link_free()
362 struct device *sup = link->supplier; in devlink_add_symlinks()
367 len += strlen("supplier:") + 1; in devlink_add_symlinks()
372 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier"); in devlink_add_symlinks()
385 snprintf(buf, len, "supplier:%s", dev_name(sup)); in devlink_add_symlinks()
398 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_add_symlinks()
409 struct device *sup = link->supplier; in devlink_remove_symlinks()
414 sysfs_remove_link(&link->link_dev.kobj, "supplier"); in devlink_remove_symlinks()
417 len += strlen("supplier:") + 1; in devlink_remove_symlinks()
424 snprintf(buf, len, "supplier:%s", dev_name(sup)); in devlink_remove_symlinks()
464 * @supplier: Supplier end of the link.
470 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
486 * after unbinding the consumer or supplier driver, respectively, from its
489 * the consumer or the supplier) is unregistered.
495 * driver after successfully binding a driver to the supplier device.
500 * However, if a device link between the given @consumer and @supplier pair
513 * The supplier device is required to be registered when this function is called
518 struct device *supplier, u32 flags) in device_link_add() argument
522 if (!consumer || !supplier || flags & ~DL_ADD_VALID_FLAGS || in device_link_add()
532 if (pm_runtime_get_sync(supplier) < 0) { in device_link_add()
533 pm_runtime_put_noidle(supplier); in device_link_add()
545 * If the supplier has not been fully registered yet or there is a in device_link_add()
547 * the supplier already in the graph, return NULL. If the link is a in device_link_add()
551 if (!device_pm_initialized(supplier) in device_link_add()
553 device_is_dependent(consumer, supplier))) { in device_link_add()
566 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
608 device_link_init_status(link, consumer, supplier); in device_link_add()
625 get_device(supplier); in device_link_add()
626 link->supplier = supplier; in device_link_add()
637 dev_name(supplier), dev_name(consumer)); in device_link_add()
640 put_device(supplier); in device_link_add()
657 device_link_init_status(link, consumer, supplier); in device_link_add()
661 * resume the supplier even without DL_FLAG_RPM_ACTIVE. in device_link_add()
665 pm_runtime_resume(supplier); in device_link_add()
667 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
673 dev_name(supplier)); in device_link_add()
687 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
694 pm_runtime_put(supplier); in device_link_add()
708 * The caller is responsible for adding the links to the supplier devices once
736 * supplier devices, leaving any
741 * supplier links. If that succeeds, the consumer device is removed from
746 * added all the supplier links for the consumer device. It should return an
774 dev_name(link->supplier)); in __device_link_del()
788 dev_name(link->supplier)); in __device_link_del()
826 * @supplier: Supplier end of the link.
831 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
835 if (WARN_ON(consumer == supplier)) in device_link_remove()
840 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
859 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
869 * device_links_check_suppliers - Check presence of supplier drivers.
876 * We need to guarantee that the supplier will not go away after the check has
879 * mark the link as "consumer probe in progress" to make the supplier removal
890 * Device waiting for supplier to become available is not allowed to in device_links_check_suppliers()
1108 * probe" state to start with if the supplier is still probing in device_links_driver_bound()
1129 struct device *supplier; in device_links_driver_bound() local
1134 supplier = link->supplier; in device_links_driver_bound()
1150 * device link that was preventing the supplier from getting a in device_links_driver_bound()
1154 __device_links_supplier_defer_sync(supplier); in device_links_driver_bound()
1156 __device_links_queue_sync_state(supplier, &sync_list); in device_links_driver_bound()
1173 * unless they already are in the "supplier unbind in progress" state in which
1195 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1291 * state to "supplier unbind" to prevent the consumer from being probed
1331 * If that's not the case, change the status of the link to "supplier unbind"
1455 * consumers can find this device as a supplier. So, this check is in fw_devlink_link_device()
1521 * all the supplier devices already registered and ready to link to. It won't
2921 * this device (supplier) to be added so that they can create a device in device_add()
2925 * requires the supplier be registered before it's called. in device_add()