Lines Matching refs:consumer
144 * its consumer etc). Return 1 if that is the case or 0 otherwise.
167 if (link->consumer == target)
170 ret = device_is_dependent(link->consumer, target);
178 struct device *consumer,
183 switch (consumer->links.status) {
186 * A consumer driver can create a link to a supplier
200 switch (consumer->links.status) {
239 device_reorder_to_tail(link->consumer, NULL);
283 output = "consumer probing";
309 output = "consumer unbind";
355 put_device(link->consumer);
367 * synchronization in device_link_release_fn() and if the consumer or
388 struct device *con = link->consumer;
403 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer");
407 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
420 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
423 sysfs_remove_link(&link->link_dev.kobj, "consumer");
437 struct device *con = link->consumer;
440 sysfs_remove_link(&link->link_dev.kobj, "consumer");
457 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
494 * @consumer: Consumer end of the link.
517 * after unbinding the consumer or supplier driver, respectively, from its
520 * the consumer or the supplier) is unregistered.
531 * However, if a device link between the given @consumer and @supplier pair
540 * devices_kset list by moving the consumer device and all devices depending
545 * and NULL will be returned if that is not the case. The consumer device need
548 struct device_link *device_link_add(struct device *consumer,
553 if (!consumer || !supplier || consumer == supplier ||
578 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and
585 device_is_dependent(consumer, supplier))) {
599 if (link->consumer != consumer)
604 pm_runtime_new_link(consumer);
640 device_link_init_status(link, consumer, supplier);
660 get_device(consumer);
661 link->consumer = consumer;
670 dev_bus_name(consumer), dev_name(consumer));
681 pm_runtime_new_link(consumer);
688 device_link_init_status(link, consumer, supplier);
691 * Some callers expect the link creation during consumer driver probe to
699 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
702 dev_dbg(consumer,
703 "Linked as a sync state only consumer to %s\n",
710 * Move the consumer and all of the devices depending on it to the end
716 device_reorder_to_tail(consumer, NULL);
718 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
733 * @consumer: Consumer device
735 * Marks the @consumer device as waiting for suppliers to become available by
736 * adding it to the wait_for_suppliers list. The consumer device will never be
740 * they are available and removing the @consumer device from the
744 * consumer but rather from code that creates/adds the consumer device.
746 static void device_link_wait_for_supplier(struct device *consumer,
750 list_add_tail(&consumer->links.needs_suppliers, &wait_for_suppliers);
751 consumer->links.need_for_probe = need_for_probe;
755 static void device_link_wait_for_mandatory_supplier(struct device *consumer)
757 device_link_wait_for_supplier(consumer, true);
760 static void device_link_wait_for_optional_supplier(struct device *consumer)
762 device_link_wait_for_supplier(consumer, false);
766 * device_link_add_missing_supplier_links - Add links from consumer devices to
768 * consumer with inactive suppliers on
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
804 dev_dbg(link->consumer, "Dropping the link to %s\n",
818 dev_info(link->consumer, "Dropping the link to %s\n",
856 * @consumer: Consumer end of the link.
862 void device_link_remove(void *consumer, struct device *supplier)
866 if (WARN_ON(consumer == supplier))
872 if (link->consumer == consumer) {
910 * mark the link as "consumer probe in progress" to make the supplier removal
1138 * Links created during consumer probe may be in the "consumer
1141 * consumer probe returns first. Skip them here.
1151 driver_deferred_probe_add(link->consumer);
1259 * "consumer probe" or "active", it must have been added by
1260 * a probing consumer while this device was still probing.
1298 * autoremove the links between this @dev and its consumer
1319 * Check each consumer of the device and return 'true' if its link's status
1320 * is one of "consumer probe" or "active" (meaning that the given consumer is
1322 * state to "supplier unbind" to prevent the consumer from being probed
1359 * "consumer probe" state, wait for all device probes in progress to complete
1363 * and check if the link was in the "active" state. If so, force the consumer
1364 * driver to unbind and start over (the consumer will not re-probe as we have
1392 struct device *consumer = link->consumer;
1394 get_device(consumer);
1398 device_release_driver_internal(consumer, NULL,
1399 consumer->parent);
1400 put_device(consumer);