Lines Matching full:consumer

50  * @con: Consumer end of the link.
71 if (link->consumer == con) { in __fwnode_link_add()
82 link->consumer = con; in __fwnode_link_add()
88 pr_debug("%pfwf Linked as a fwnode consumer to %pfwf\n", in __fwnode_link_add()
113 link->consumer, link->supplier); in __fwnode_link_del()
128 link->consumer, link->supplier); in __fwnode_link_cycle()
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 */ in fw_devlink_purge_absent_suppliers()
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); in __fwnode_links_move_consumers()
298 * its consumer etc). Return 1 if that is the case or 0 otherwise.
321 if (link->consumer == target) in device_is_dependent()
324 ret = device_is_dependent(link->consumer, target); in device_is_dependent()
332 struct device *consumer, in device_link_init_status() argument
337 switch (consumer->links.status) { in device_link_init_status()
340 * A consumer driver can create a link to a supplier in device_link_init_status()
354 switch (consumer->links.status) { in device_link_init_status()
393 device_reorder_to_tail(link->consumer, NULL); in device_reorder_to_tail()
437 output = "consumer probing"; in status_show()
463 output = "consumer unbind"; in auto_remove_on_show()
519 put_device(link->consumer); in device_link_release_fn()
531 * synchronization in device_link_release_fn() and if the consumer or in devlink_dev_release()
550 struct device *con = link->consumer; in devlink_add_symlinks()
565 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); in devlink_add_symlinks()
569 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
582 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
585 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_add_symlinks()
598 struct device *con = link->consumer; in devlink_remove_symlinks()
601 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_remove_symlinks()
618 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_remove_symlinks()
657 * @consumer: Consumer end of the link.
680 * after unbinding the consumer or supplier driver, respectively, from its
683 * the consumer or the supplier) is unregistered.
688 * be used to request the driver core to automatically probe for a consumer
694 * However, if a device link between the given @consumer and @supplier pair
703 * devices_kset list by moving the consumer device and all devices depending
708 * and NULL will be returned if that is not the case. The consumer device need
711 struct device_link *device_link_add(struct device *consumer, in device_link_add() argument
716 if (!consumer || !supplier || consumer == supplier || in device_link_add()
743 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and in device_link_add()
750 device_is_dependent(consumer, supplier))) { in device_link_add()
756 * SYNC_STATE_ONLY links are useless once a consumer device has probed. in device_link_add()
757 * So, only create it if the consumer hasn't probed yet. in device_link_add()
760 consumer->links.status != DL_DEV_NO_DRIVER && in device_link_add()
761 consumer->links.status != DL_DEV_PROBING) { in device_link_add()
775 if (link->consumer != consumer) in device_link_add()
784 pm_runtime_new_link(consumer); in device_link_add()
820 device_link_init_status(link, consumer, supplier); in device_link_add()
840 get_device(consumer); in device_link_add()
841 link->consumer = consumer; in device_link_add()
850 dev_bus_name(consumer), dev_name(consumer)); in device_link_add()
861 pm_runtime_new_link(consumer); in device_link_add()
868 device_link_init_status(link, consumer, supplier); in device_link_add()
871 * Some callers expect the link creation during consumer driver probe to in device_link_add()
879 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
882 dev_dbg(consumer, in device_link_add()
883 "Linked as a sync state only consumer to %s\n", in device_link_add()
890 * Move the consumer and all of the devices depending on it to the end in device_link_add()
896 device_reorder_to_tail(consumer, NULL); in device_link_add()
898 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
915 dev_dbg(link->consumer, "Dropping the link to %s\n", in __device_link_del()
928 else if (!device_is_registered(link->consumer)) in device_link_put_kref()
953 * @consumer: Consumer end of the link.
959 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
963 if (WARN_ON(consumer == supplier)) in device_link_remove()
969 if (link->consumer == consumer) { in device_link_remove()
1019 * @dev: Consumer device.
1028 * mark the link as "consumer probe in progress" to make the supplier removal
1241 * @dev: Consumer device.
1244 * driver probe functions. So the consumer really isn't going to wait for any
1323 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1326 * consumer probe returns first. Skip them here. in device_links_driver_bound()
1336 driver_deferred_probe_add(link->consumer); in device_links_driver_bound()
1365 * consumer device still managed to probe, there's no in device_links_driver_bound()
1367 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1456 * "consumer probe" or "active", it must have been added by in device_links_no_driver()
1457 * a probing consumer while this device was still probing. in device_links_no_driver()
1495 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1516 * Check each consumer of the device and return 'true' if its link's status
1517 * is one of "consumer probe" or "active" (meaning that the given consumer is
1519 * state to "supplier unbind" to prevent the consumer from being probed
1556 * "consumer probe" state, wait for all device probes in progress to complete
1560 * and check if the link was in the "active" state. If so, force the consumer
1561 * driver to unbind and start over (the consumer will not re-probe as we have
1589 struct device *consumer = link->consumer; in device_links_unbind_consumers() local
1591 get_device(consumer); in device_links_unbind_consumers()
1595 device_release_driver_internal(consumer, NULL, in device_links_unbind_consumers()
1596 consumer->parent); in device_links_unbind_consumers()
1597 put_device(consumer); in device_links_unbind_consumers()
1741 dev_dbg(link->consumer, "Relaxing link with %s\n", in fw_devlink_relax_link()
1776 dev_name(link->consumer)); in fw_devlink_dev_sync_state()
1903 * @con: Potential consumer device.
1951 * driver, sup_dev can't be a consumer of @con. So, no need to check in __fw_devlink_relax_cycles()
2007 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
2008 * @con: consumer device for the device link
2012 * This function will try to create a device link between the consumer device
2018 * device link from the consumer to a missing supplier.
2034 if (con->fwnode == link->consumer) in fw_devlink_create_devlink()
2123 * This function looks at all the consumer fwnodes of @dev and creates device
2124 * links between the consumer device and @dev (supplier).
2126 * If the consumer device has not been added yet, then this function creates a
2128 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
2129 * sync_state() callback before the real consumer device gets to be added and
2132 * Once device links are created from the real consumer to @dev (supplier), the
2145 con_dev = get_dev_from_fwnode(link->consumer); in __fw_devlink_link_to_consumers()
2147 * If consumer device is not available yet, make a "proxy" in __fw_devlink_link_to_consumers()
2148 * SYNC_STATE_ONLY link from the consumer's parent device to in __fw_devlink_link_to_consumers()
2151 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
2154 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
2157 con_dev = fwnode_get_next_parent_dev(link->consumer); in __fw_devlink_link_to_consumers()
2159 * However, if the consumer's parent device is also the in __fw_devlink_link_to_consumers()
2161 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2187 * @dev: The consumer device that needs to be linked to its suppliers
2191 * @fwnode and creates device links between @dev (consumer) and all the
2202 * @dev (consumer) and these suppliers to make sure they don't execute their
2206 * between the real consumer and supplier devices.
2229 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3629 * case the consumer device is able to operate without this supplier. in device_add()