Lines Matching full:consumer

124  * its consumer etc).  Return 1 if that is the case or 0 otherwise.
142 if (link->consumer == target) in device_is_dependent()
145 ret = device_is_dependent(link->consumer, target); in device_is_dependent()
153 struct device *consumer, in device_link_init_status() argument
158 switch (consumer->links.status) { in device_link_init_status()
161 * A consumer driver can create a link to a supplier in device_link_init_status()
175 switch (consumer->links.status) { in device_link_init_status()
214 device_reorder_to_tail(link->consumer, NULL); in device_reorder_to_tail()
258 output = "consumer probing"; in status_show()
284 output = "consumer unbind"; in auto_remove_on_show()
325 put_device(link->consumer); in device_link_free()
363 struct device *con = link->consumer; in devlink_add_symlinks()
376 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); in devlink_add_symlinks()
380 snprintf(buf, len, "consumer:%s", dev_name(con)); in devlink_add_symlinks()
393 snprintf(buf, len, "consumer:%s", dev_name(con)); in devlink_add_symlinks()
396 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_add_symlinks()
410 struct device *con = link->consumer; in devlink_remove_symlinks()
413 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_remove_symlinks()
426 snprintf(buf, len, "consumer:%s", dev_name(con)); in devlink_remove_symlinks()
463 * @consumer: Consumer end of the link.
486 * after unbinding the consumer or supplier driver, respectively, from its
489 * the consumer or the supplier) is unregistered.
500 * However, if a device link between the given @consumer and @supplier pair
509 * devices_kset list by moving the consumer device and all devices depending
514 * and NULL will be returned if that is not the case. The consumer device need
517 struct device_link *device_link_add(struct device *consumer, in device_link_add() argument
522 if (!consumer || !supplier || flags & ~DL_ADD_VALID_FLAGS || in device_link_add()
546 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and in device_link_add()
553 device_is_dependent(consumer, supplier))) { in device_link_add()
567 if (link->consumer != consumer) in device_link_add()
572 pm_runtime_new_link(consumer); in device_link_add()
608 device_link_init_status(link, consumer, supplier); in device_link_add()
628 get_device(consumer); in device_link_add()
629 link->consumer = consumer; in device_link_add()
637 dev_name(supplier), dev_name(consumer)); in device_link_add()
639 put_device(consumer); in device_link_add()
650 pm_runtime_new_link(consumer); in device_link_add()
657 device_link_init_status(link, consumer, supplier); in device_link_add()
660 * Some callers expect the link creation during consumer driver probe to in device_link_add()
668 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
671 dev_dbg(consumer, in device_link_add()
672 "Linked as a sync state only consumer to %s\n", in device_link_add()
679 * Move the consumer and all of the devices depending on it to the end in device_link_add()
685 device_reorder_to_tail(consumer, NULL); in device_link_add()
687 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
702 * @consumer: Consumer device
704 * Marks the @consumer device as waiting for suppliers to become available by
705 * adding it to the wait_for_suppliers list. The consumer device will never be
709 * they are available and removing the @consumer device from the
713 * consumer but rather from code that creates/adds the consumer device.
715 static void device_link_wait_for_supplier(struct device *consumer, in device_link_wait_for_supplier() argument
719 list_add_tail(&consumer->links.needs_suppliers, &wait_for_suppliers); in device_link_wait_for_supplier()
720 consumer->links.need_for_probe = need_for_probe; in device_link_wait_for_supplier()
724 static void device_link_wait_for_mandatory_supplier(struct device *consumer) in device_link_wait_for_mandatory_supplier() argument
726 device_link_wait_for_supplier(consumer, true); in device_link_wait_for_mandatory_supplier()
729 static void device_link_wait_for_optional_supplier(struct device *consumer) in device_link_wait_for_optional_supplier() argument
731 device_link_wait_for_supplier(consumer, false); in device_link_wait_for_optional_supplier()
735 * device_link_add_missing_supplier_links - Add links from consumer devices to
737 * consumer with inactive suppliers on
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
773 dev_dbg(link->consumer, "Dropping the link to %s\n", in __device_link_del()
787 dev_info(link->consumer, "Dropping the link to %s\n", in __device_link_del()
825 * @consumer: Consumer 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()
841 if (link->consumer == consumer) { in device_link_remove()
870 * @dev: Consumer device.
879 * mark the link as "consumer probe in progress" to make the supplier removal
1107 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1110 * consumer probe returns first. Skip them here. in device_links_driver_bound()
1120 driver_deferred_probe_add(link->consumer); in device_links_driver_bound()
1228 * "consumer probe" or "active", it must have been added by in device_links_no_driver()
1229 * a probing consumer while this device was still probing. in device_links_no_driver()
1267 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1288 * Check each consumer of the device and return 'true' if its link's status
1289 * is one of "consumer probe" or "active" (meaning that the given consumer is
1291 * state to "supplier unbind" to prevent the consumer from being probed
1328 * "consumer probe" state, wait for all device probes in progress to complete
1332 * and check if the link was in the "active" state. If so, force the consumer
1333 * driver to unbind and start over (the consumer will not re-probe as we have
1361 struct device *consumer = link->consumer; in device_links_unbind_consumers() local
1363 get_device(consumer); in device_links_unbind_consumers()
1367 device_release_driver_internal(consumer, NULL, in device_links_unbind_consumers()
1368 consumer->parent); in device_links_unbind_consumers()
1369 put_device(consumer); in device_links_unbind_consumers()