Lines Matching full:consumer

52  * @con: Consumer end of the link.
74 if (link->consumer == con) { in __fwnode_link_add()
85 link->consumer = con; in __fwnode_link_add()
91 pr_debug("%pfwf Linked as a fwnode consumer to %pfwf\n", in __fwnode_link_add()
114 link->consumer, link->supplier); in __fwnode_link_del()
129 link->consumer, link->supplier); in __fwnode_link_cycle()
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 */ in fw_devlink_purge_absent_suppliers()
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); in __fwnode_links_move_consumers()
301 * its consumer etc). Return 1 if that is the case or 0 otherwise.
324 if (link->consumer == target) in device_is_dependent()
327 ret = device_is_dependent(link->consumer, target); in device_is_dependent()
335 struct device *consumer, in device_link_init_status() argument
340 switch (consumer->links.status) { in device_link_init_status()
343 * A consumer driver can create a link to a supplier in device_link_init_status()
357 switch (consumer->links.status) { in device_link_init_status()
396 device_reorder_to_tail(link->consumer, NULL); in device_reorder_to_tail()
440 output = "consumer probing"; in status_show()
466 output = "consumer unbind"; in auto_remove_on_show()
521 put_device(link->consumer); in device_link_release_fn()
533 * synchronization in device_link_release_fn() and if the consumer or in devlink_dev_release()
566 struct device *con = link->consumer; in devlink_add_symlinks()
572 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); in devlink_add_symlinks()
576 buf_con = kasprintf(GFP_KERNEL, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
601 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_add_symlinks()
613 struct device *con = link->consumer; in devlink_remove_symlinks()
615 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_remove_symlinks()
625 buf_con = kasprintf(GFP_KERNEL, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_remove_symlinks()
670 * @consumer: Consumer end of the link.
696 * after unbinding the consumer or supplier driver, respectively, from its
699 * the consumer or the supplier) is unregistered.
704 * be used to request the driver core to automatically probe for a consumer
710 * However, if a device link between the given @consumer and @supplier pair
719 * devices_kset list by moving the consumer device and all devices depending
724 * and NULL will be returned if that is not the case. The consumer device need
727 struct device_link *device_link_add(struct device *consumer, in device_link_add() argument
732 if (!consumer || !supplier || consumer == supplier || in device_link_add()
759 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and in device_link_add()
766 device_is_dependent(consumer, supplier))) { in device_link_add()
772 * SYNC_STATE_ONLY links are useless once a consumer device has probed. in device_link_add()
773 * So, only create it if the consumer hasn't probed yet. in device_link_add()
776 consumer->links.status != DL_DEV_NO_DRIVER && in device_link_add()
777 consumer->links.status != DL_DEV_PROBING) { in device_link_add()
791 if (link->consumer != consumer) in device_link_add()
800 pm_runtime_new_link(consumer); in device_link_add()
836 device_link_init_status(link, consumer, supplier); in device_link_add()
856 get_device(consumer); in device_link_add()
857 link->consumer = consumer; in device_link_add()
866 dev_bus_name(consumer), dev_name(consumer)); in device_link_add()
877 pm_runtime_new_link(consumer); in device_link_add()
884 device_link_init_status(link, consumer, supplier); in device_link_add()
887 * Some callers expect the link creation during consumer driver probe to in device_link_add()
895 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
898 dev_dbg(consumer, in device_link_add()
899 "Linked as a sync state only consumer to %s\n", in device_link_add()
906 * Move the consumer and all of the devices depending on it to the end in device_link_add()
912 device_reorder_to_tail(consumer, NULL); in device_link_add()
914 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
931 dev_dbg(link->consumer, "Dropping the link to %s\n", in __device_link_del()
944 else if (!device_is_registered(link->consumer)) in device_link_put_kref()
969 * @consumer: Consumer end of the link.
975 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
979 if (WARN_ON(consumer == supplier)) in device_link_remove()
985 if (link->consumer == consumer) { in device_link_remove()
1036 * @dev: Consumer device.
1045 * mark the link as "consumer probe in progress" to make the supplier removal
1251 * @dev: Consumer device.
1254 * driver probe functions. So the consumer really isn't going to wait for any
1335 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1338 * consumer probe returns first. Skip them here. in device_links_driver_bound()
1348 driver_deferred_probe_add(link->consumer); in device_links_driver_bound()
1377 * consumer device still managed to probe, there's no in device_links_driver_bound()
1379 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1468 * "consumer probe" or "active", it must have been added by in device_links_no_driver()
1469 * a probing consumer while this device was still probing. in device_links_no_driver()
1507 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1528 * Check each consumer of the device and return 'true' if its link's status
1529 * is one of "consumer probe" or "active" (meaning that the given consumer is
1531 * state to "supplier unbind" to prevent the consumer from being probed
1568 * "consumer probe" state, wait for all device probes in progress to complete
1572 * and check if the link was in the "active" state. If so, force the consumer
1573 * driver to unbind and start over (the consumer will not re-probe as we have
1601 struct device *consumer = link->consumer; in device_links_unbind_consumers() local
1603 get_device(consumer); in device_links_unbind_consumers()
1607 device_release_driver_internal(consumer, NULL, in device_links_unbind_consumers()
1608 consumer->parent); in device_links_unbind_consumers()
1609 put_device(consumer); in device_links_unbind_consumers()
1753 dev_dbg(link->consumer, "Relaxing link with %s\n", in fw_devlink_relax_link()
1788 dev_name(link->consumer)); in fw_devlink_dev_sync_state()
1971 * @con_handle: Potential consumer device fwnode.
2020 * driver, sup_dev can't be a consumer of @con. So, no need to check in __fw_devlink_relax_cycles()
2085 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
2086 * @con: consumer device for the device link
2090 * This function will try to create a device link between the consumer device
2096 * device link from the consumer to a missing supplier.
2140 if (__fw_devlink_relax_cycles(link->consumer, sup_handle)) { in fw_devlink_create_devlink()
2144 link->consumer, sup_handle); in fw_devlink_create_devlink()
2148 if (con->fwnode == link->consumer) in fw_devlink_create_devlink()
2175 flags, dev_name(sup_dev), link->consumer); in fw_devlink_create_devlink()
2203 * This function looks at all the consumer fwnodes of @dev and creates device
2204 * links between the consumer device and @dev (supplier).
2206 * If the consumer device has not been added yet, then this function creates a
2208 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
2209 * sync_state() callback before the real consumer device gets to be added and
2212 * Once device links are created from the real consumer to @dev (supplier), the
2225 con_dev = get_dev_from_fwnode(link->consumer); in __fw_devlink_link_to_consumers()
2227 * If consumer device is not available yet, make a "proxy" in __fw_devlink_link_to_consumers()
2228 * SYNC_STATE_ONLY link from the consumer's parent device to in __fw_devlink_link_to_consumers()
2231 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
2234 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
2237 con_dev = fwnode_get_next_parent_dev(link->consumer); in __fw_devlink_link_to_consumers()
2239 * However, if the consumer's parent device is also the in __fw_devlink_link_to_consumers()
2241 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2267 * @dev: The consumer device that needs to be linked to its suppliers
2271 * @fwnode and creates device links between @dev (consumer) and all the
2282 * @dev (consumer) and these suppliers to make sure they don't execute their
2286 * between the real consumer and supplier devices.
2309 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3694 * case the consumer device is able to operate without this supplier. in device_add()