Lines Matching refs:consumer

71 		if (link->consumer == con) {
82 link->consumer = con;
88 pr_debug("%pfwf Linked as a fwnode consumer to %pfwf\n",
113 link->consumer, link->supplier);
128 link->consumer, link->supplier);
149 * fwnode_links_purge_consumers - Delete all consumer links of fwnode_handle.
150 * @fwnode: fwnode whose consumer links need to be deleted
152 * Deletes all consumer links connecting directly to @fwnode.
180 /* Don't purge consumer links of an added child */
193 * __fwnode_links_move_consumers - Move consumer from @from to @to fwnode_handle
197 * Move all consumer links from @from fwnode to @to fwnode.
205 __fwnode_link_add(link->consumer, to, link->flags);
300 * its consumer etc). Return 1 if that is the case or 0 otherwise.
323 if (link->consumer == target)
326 ret = device_is_dependent(link->consumer, target);
334 struct device *consumer,
339 switch (consumer->links.status) {
342 * A consumer driver can create a link to a supplier
356 switch (consumer->links.status) {
395 device_reorder_to_tail(link->consumer, NULL);
439 output = "consumer probing";
465 output = "consumer unbind";
521 put_device(link->consumer);
533 * synchronization in device_link_release_fn() and if the consumer or
552 struct device *con = link->consumer;
567 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer");
571 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
584 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
587 sysfs_remove_link(&link->link_dev.kobj, "consumer");
600 struct device *con = link->consumer;
603 sysfs_remove_link(&link->link_dev.kobj, "consumer");
620 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
659 * @consumer: Consumer end of the link.
682 * after unbinding the consumer or supplier driver, respectively, from its
685 * the consumer or the supplier) is unregistered.
690 * be used to request the driver core to automatically probe for a consumer
696 * However, if a device link between the given @consumer and @supplier pair
705 * devices_kset list by moving the consumer device and all devices depending
710 * and NULL will be returned if that is not the case. The consumer device need
713 struct device_link *device_link_add(struct device *consumer,
718 if (!consumer || !supplier || consumer == supplier ||
745 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and
752 device_is_dependent(consumer, supplier))) {
758 * SYNC_STATE_ONLY links are useless once a consumer device has probed.
759 * So, only create it if the consumer hasn't probed yet.
762 consumer->links.status != DL_DEV_NO_DRIVER &&
763 consumer->links.status != DL_DEV_PROBING) {
777 if (link->consumer != consumer)
786 pm_runtime_new_link(consumer);
822 device_link_init_status(link, consumer, supplier);
842 get_device(consumer);
843 link->consumer = consumer;
852 dev_bus_name(consumer), dev_name(consumer));
863 pm_runtime_new_link(consumer);
870 device_link_init_status(link, consumer, supplier);
873 * Some callers expect the link creation during consumer driver probe to
881 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
884 dev_dbg(consumer,
885 "Linked as a sync state only consumer to %s\n",
892 * Move the consumer and all of the devices depending on it to the end
898 device_reorder_to_tail(consumer, NULL);
900 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
917 dev_dbg(link->consumer, "Dropping the link to %s\n",
930 else if (!device_is_registered(link->consumer))
955 * @consumer: Consumer end of the link.
961 void device_link_remove(void *consumer, struct device *supplier)
965 if (WARN_ON(consumer == supplier))
971 if (link->consumer == consumer) {
1030 * mark the link as "consumer probe in progress" to make the supplier removal
1246 * driver probe functions. So the consumer really isn't going to wait for any
1325 * Links created during consumer probe may be in the "consumer
1328 * consumer probe returns first. Skip them here.
1338 driver_deferred_probe_add(link->consumer);
1367 * consumer device still managed to probe, there's no
1369 * (consumer probed before supplier). So delete it.
1458 * "consumer probe" or "active", it must have been added by
1459 * a probing consumer while this device was still probing.
1497 * autoremove the links between this @dev and its consumer
1518 * Check each consumer of the device and return 'true' if its link's status
1519 * is one of "consumer probe" or "active" (meaning that the given consumer is
1521 * state to "supplier unbind" to prevent the consumer from being probed
1558 * "consumer probe" state, wait for all device probes in progress to complete
1562 * and check if the link was in the "active" state. If so, force the consumer
1563 * driver to unbind and start over (the consumer will not re-probe as we have
1591 struct device *consumer = link->consumer;
1593 get_device(consumer);
1597 device_release_driver_internal(consumer, NULL,
1598 consumer->parent);
1599 put_device(consumer);
1743 dev_dbg(link->consumer, "Relaxing link with %s\n",
1778 dev_name(link->consumer));
1905 * @con: Potential consumer device.
1953 * driver, sup_dev can't be a consumer of @con. So, no need to check
2009 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
2010 * @con: consumer device for the device link
2014 * This function will try to create a device link between the consumer device
2020 * device link from the consumer to a missing supplier.
2036 if (con->fwnode == link->consumer)
2065 * is because the consumer and supplier might be part of multiple cycles
2130 * This function looks at all the consumer fwnodes of @dev and creates device
2131 * links between the consumer device and @dev (supplier).
2133 * If the consumer device has not been added yet, then this function creates a
2135 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
2136 * sync_state() callback before the real consumer device gets to be added and
2139 * Once device links are created from the real consumer to @dev (supplier), the
2152 con_dev = get_dev_from_fwnode(link->consumer);
2154 * If consumer device is not available yet, make a "proxy"
2155 * SYNC_STATE_ONLY link from the consumer's parent device to
2158 * consumer can create a device link to the supplier.
2161 * consumer's parent device is added before the supplier.
2164 con_dev = fwnode_get_next_parent_dev(link->consumer);
2166 * However, if the consumer's parent device is also the
2168 * consumer-supplier link from the parent to its child
2194 * @dev: The consumer device that needs to be linked to its suppliers
2198 * @fwnode and creates device links between @dev (consumer) and all the
2209 * @dev (consumer) and these suppliers to make sure they don't execute their
2213 * between the real consumer and supplier devices.
2236 * case where the supplier is added before the consumer's parent device
3636 * case the consumer device is able to operate without this supplier.