Lines Matching defs:consumer
74 if (link->consumer == con) {
85 link->consumer = con;
91 pr_debug("%pfwf Linked as a fwnode consumer to %pfwf\n",
114 link->consumer, link->supplier);
129 link->consumer, link->supplier);
150 * fwnode_links_purge_consumers - Delete all consumer links of fwnode_handle.
151 * @fwnode: fwnode whose consumer links need to be deleted
153 * Deletes all consumer links connecting directly to @fwnode.
181 /* Don't purge consumer links of an added child */
194 * __fwnode_links_move_consumers - Move consumer from @from to @to fwnode_handle
198 * Move all consumer links from @from fwnode to @to fwnode.
206 __fwnode_link_add(link->consumer, to, link->flags);
253 * This function is mainly meant to adjust the supplier/consumer dependencies
374 * its consumer etc). Return 1 if that is the case or 0 otherwise.
397 if (link->consumer == target)
400 ret = device_is_dependent(link->consumer, target);
408 struct device *consumer,
413 switch (consumer->links.status) {
416 * A consumer driver can create a link to a supplier
430 switch (consumer->links.status) {
469 device_reorder_to_tail(link->consumer, NULL);
513 output = "consumer probing";
539 output = "consumer unbind";
594 put_device(link->consumer);
606 * synchronization in device_link_release_fn() and if the consumer or
639 struct device *con = link->consumer;
645 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer");
649 buf_con = kasprintf(GFP_KERNEL, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
674 sysfs_remove_link(&link->link_dev.kobj, "consumer");
686 struct device *con = link->consumer;
688 sysfs_remove_link(&link->link_dev.kobj, "consumer");
698 buf_con = kasprintf(GFP_KERNEL, "consumer:%s:%s", dev_bus_name(con), dev_name(con));
743 * @consumer: Consumer end of the link.
769 * after unbinding the consumer or supplier driver, respectively, from its
772 * the consumer or the supplier) is unregistered.
777 * be used to request the driver core to automatically probe for a consumer
783 * However, if a device link between the given @consumer and @supplier pair
792 * devices_kset list by moving the consumer device and all devices depending
797 * and NULL will be returned if that is not the case. The consumer device need
800 struct device_link *device_link_add(struct device *consumer,
805 if (!consumer || !supplier || consumer == supplier ||
832 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and
839 device_is_dependent(consumer, supplier))) {
845 * SYNC_STATE_ONLY links are useless once a consumer device has probed.
846 * So, only create it if the consumer hasn't probed yet.
849 consumer->links.status != DL_DEV_NO_DRIVER &&
850 consumer->links.status != DL_DEV_PROBING) {
864 if (link->consumer != consumer)
873 pm_runtime_new_link(consumer);
909 device_link_init_status(link, consumer, supplier);
929 get_device(consumer);
930 link->consumer = consumer;
939 dev_bus_name(consumer), dev_name(consumer));
950 pm_runtime_new_link(consumer);
957 device_link_init_status(link, consumer, supplier);
960 * Some callers expect the link creation during consumer driver probe to
968 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
971 dev_dbg(consumer,
972 "Linked as a sync state only consumer to %s\n",
979 * Move the consumer and all of the devices depending on it to the end
985 device_reorder_to_tail(consumer, NULL);
987 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier));
1004 dev_dbg(link->consumer, "Dropping the link to %s\n",
1017 else if (!device_is_registered(link->consumer))
1042 * @consumer: Consumer end of the link.
1048 void device_link_remove(void *consumer, struct device *supplier)
1052 if (WARN_ON(consumer == supplier))
1058 if (link->consumer == consumer) {
1118 * mark the link as "consumer probe in progress" to make the supplier removal
1327 * driver probe functions. So the consumer really isn't going to wait for any
1400 * Links created during consumer probe may be in the "consumer
1403 * consumer probe returns first. Skip them here.
1413 driver_deferred_probe_add(link->consumer);
1442 * consumer device still managed to probe, there's no
1444 * (consumer probed before supplier). So delete it.
1534 * "consumer probe" or "active", it must have been added by
1535 * a probing consumer while this device was still probing.
1573 * autoremove the links between this @dev and its consumer
1594 * Check each consumer of the device and return 'true' if its link's status
1595 * is one of "consumer probe" or "active" (meaning that the given consumer is
1597 * state to "supplier unbind" to prevent the consumer from being probed
1634 * "consumer probe" state, wait for all device probes in progress to complete
1638 * and check if the link was in the "active" state. If so, force the consumer
1639 * driver to unbind and start over (the consumer will not re-probe as we have
1667 struct device *consumer = link->consumer;
1669 get_device(consumer);
1673 device_release_driver_internal(consumer, NULL,
1674 consumer->parent);
1675 put_device(consumer);
1819 dev_dbg(link->consumer, "Relaxing link with %s\n",
1854 dev_name(link->consumer));
2037 * @con_handle: Potential consumer device fwnode.
2086 * driver, sup_dev can't be a consumer of @con. So, no need to check
2151 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
2152 * @con: consumer device for the device link
2156 * This function will try to create a device link between the consumer device
2162 * device link from the consumer to a missing supplier.
2206 if (__fw_devlink_relax_cycles(link->consumer, sup_handle)) {
2210 link->consumer, sup_handle);
2214 if (con->fwnode == link->consumer)
2241 flags, dev_name(sup_dev), link->consumer);
2269 * This function looks at all the consumer fwnodes of @dev and creates device
2270 * links between the consumer device and @dev (supplier).
2272 * If the consumer device has not been added yet, then this function creates a
2274 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
2275 * sync_state() callback before the real consumer device gets to be added and
2278 * Once device links are created from the real consumer to @dev (supplier), the
2291 con_dev = get_dev_from_fwnode(link->consumer);
2293 * If consumer device is not available yet, make a "proxy"
2294 * SYNC_STATE_ONLY link from the consumer's parent device to
2297 * consumer can create a device link to the supplier.
2300 * consumer's parent device is added before the supplier.
2303 con_dev = fwnode_get_next_parent_dev(link->consumer);
2305 * However, if the consumer's parent device is also the
2307 * consumer-supplier link from the parent to its child
2333 * @dev: The consumer device that needs to be linked to its suppliers
2337 * @fwnode and creates device links between @dev (consumer) and all the
2348 * @dev (consumer) and these suppliers to make sure they don't execute their
2352 * between the real consumer and supplier devices.
2375 * case where the supplier is added before the consumer's parent device
3777 * case the consumer device is able to operate without this supplier.