Lines Matching defs:supplier
179 struct device *supplier)
181 switch (supplier->links.status) {
186 * A consumer driver can create a link to a supplier
188 * knows that the supplier is already functional (for
190 * supplier).
289 output = "supplier unbinding";
307 output = "supplier unbind";
353 pm_request_idle(link->supplier);
356 put_device(link->supplier);
368 * supplier devices get deleted when it runs, so put it into the "long"
387 struct device *sup = link->supplier;
394 len += strlen("supplier:") + 1;
399 ret = sysfs_create_link(&link->link_dev.kobj, &sup->kobj, "supplier");
412 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup));
425 sysfs_remove_link(&link->link_dev.kobj, "supplier");
436 struct device *sup = link->supplier;
441 sysfs_remove_link(&link->link_dev.kobj, "supplier");
446 len += strlen("supplier:") + 1;
454 snprintf(buf, len, "supplier:%s:%s", dev_bus_name(sup), dev_name(sup));
495 * @supplier: Supplier end of the link.
501 * DL_FLAG_RPM_ACTIVE flag is set in addition to it, the supplier devices will
517 * after unbinding the consumer or supplier driver, respectively, from its
520 * the consumer or the supplier) is unregistered.
526 * driver after successfully binding a driver to the supplier device.
531 * However, if a device link between the given @consumer and @supplier pair
544 * The supplier device is required to be registered when this function is called
549 struct device *supplier, u32 flags)
553 if (!consumer || !supplier || consumer == supplier ||
564 if (pm_runtime_get_sync(supplier) < 0) {
565 pm_runtime_put_noidle(supplier);
577 * If the supplier has not been fully registered yet or there is a
579 * the supplier already in the graph, return NULL. If the link is a
583 if (!device_pm_initialized(supplier)
585 device_is_dependent(consumer, supplier))) {
598 list_for_each_entry(link, &supplier->links.consumers, s_node) {
640 device_link_init_status(link, consumer, supplier);
657 get_device(supplier);
658 link->supplier = supplier;
669 dev_bus_name(supplier), dev_name(supplier),
688 device_link_init_status(link, consumer, supplier);
692 * resume the supplier even without DL_FLAG_RPM_ACTIVE.
696 pm_runtime_resume(supplier);
698 list_add_tail_rcu(&link->s_node, &supplier->links.consumers);
704 dev_name(supplier));
718 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
725 pm_runtime_put(supplier);
739 * The caller is responsible for adding the links to the supplier devices once
767 * supplier devices, leaving any
772 * supplier links. If that succeeds, the consumer device is removed from
777 * added all the supplier links for the consumer device. It should return an
805 dev_name(link->supplier));
819 dev_name(link->supplier));
857 * @supplier: Supplier end of the link.
862 void device_link_remove(void *consumer, struct device *supplier)
866 if (WARN_ON(consumer == supplier))
871 list_for_each_entry(link, &supplier->links.consumers, s_node) {
890 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
900 * device_links_check_suppliers - Check presence of supplier drivers.
907 * We need to guarantee that the supplier will not go away after the check has
910 * mark the link as "consumer probe in progress" to make the supplier removal
921 * Device waiting for supplier to become available is not allowed to
1139 * probe" state to start with if the supplier is still probing
1160 struct device *supplier;
1165 supplier = link->supplier;
1181 * device link that was preventing the supplier from getting a
1185 __device_links_supplier_defer_sync(supplier);
1187 __device_links_queue_sync_state(supplier, &sync_list);
1204 * unless they already are in the "supplier unbind in progress" state in which
1226 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
1322 * state to "supplier unbind" to prevent the consumer from being probed
1362 * If that's not the case, change the status of the link to "supplier unbind"
1486 * consumers can find this device as a supplier. So, this check is
1552 * all the supplier devices already registered and ready to link to. It won't
2984 * this device (supplier) to be added so that they can create a device
2988 * requires the supplier be registered before it's called.