Lines Matching full:consumer

56  * @con: Consumer end of the link.
79 if (link->consumer == con) in fwnode_link_add()
90 link->consumer = con; in fwnode_link_add()
121 * fwnode_links_purge_consumers - Delete all consumer links of fwnode_handle.
122 * @fwnode: fwnode whose consumer links need to be deleted
124 * Deletes all consumer links connecting directly to @fwnode.
155 /* Don't purge consumer links of an added child */ in fw_devlink_purge_absent_suppliers()
263 * its consumer etc). Return 1 if that is the case or 0 otherwise.
287 if (link->consumer == target) in device_is_dependent()
290 ret = device_is_dependent(link->consumer, target); in device_is_dependent()
298 struct device *consumer, in device_link_init_status() argument
303 switch (consumer->links.status) { in device_link_init_status()
306 * A consumer driver can create a link to a supplier in device_link_init_status()
320 switch (consumer->links.status) { in device_link_init_status()
360 device_reorder_to_tail(link->consumer, NULL); in device_reorder_to_tail()
404 output = "consumer probing"; in status_show()
430 output = "consumer unbind"; in auto_remove_on_show()
476 put_device(link->consumer); in device_link_release_fn()
488 * synchronization in device_link_release_fn() and if the consumer or in devlink_dev_release()
509 struct device *con = link->consumer; in devlink_add_symlinks()
524 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); in devlink_add_symlinks()
528 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
541 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
544 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_add_symlinks()
558 struct device *con = link->consumer; in devlink_remove_symlinks()
561 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_remove_symlinks()
578 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_remove_symlinks()
616 * @consumer: Consumer end of the link.
639 * after unbinding the consumer or supplier driver, respectively, from its
642 * the consumer or the supplier) is unregistered.
653 * However, if a device link between the given @consumer and @supplier pair
662 * devices_kset list by moving the consumer device and all devices depending
667 * and NULL will be returned if that is not the case. The consumer device need
670 struct device_link *device_link_add(struct device *consumer, in device_link_add() argument
675 if (!consumer || !supplier || consumer == supplier || in device_link_add()
700 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and in device_link_add()
707 device_is_dependent(consumer, supplier))) { in device_link_add()
713 * SYNC_STATE_ONLY links are useless once a consumer device has probed. in device_link_add()
714 * So, only create it if the consumer hasn't probed yet. in device_link_add()
717 consumer->links.status != DL_DEV_NO_DRIVER && in device_link_add()
718 consumer->links.status != DL_DEV_PROBING) { in device_link_add()
732 if (link->consumer != consumer) in device_link_add()
741 pm_runtime_new_link(consumer); in device_link_add()
777 device_link_init_status(link, consumer, supplier); in device_link_add()
797 get_device(consumer); in device_link_add()
798 link->consumer = consumer; in device_link_add()
807 dev_bus_name(consumer), dev_name(consumer)); in device_link_add()
818 pm_runtime_new_link(consumer); in device_link_add()
825 device_link_init_status(link, consumer, supplier); in device_link_add()
828 * Some callers expect the link creation during consumer driver probe to in device_link_add()
836 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
839 dev_dbg(consumer, in device_link_add()
840 "Linked as a sync state only consumer to %s\n", in device_link_add()
847 * Move the consumer and all of the devices depending on it to the end in device_link_add()
853 device_reorder_to_tail(consumer, NULL); in device_link_add()
855 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
872 dev_dbg(link->consumer, "Dropping the link to %s\n", in __device_link_del()
908 * @consumer: Consumer end of the link.
914 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
918 if (WARN_ON(consumer == supplier)) in device_link_remove()
924 if (link->consumer == consumer) { in device_link_remove()
953 * @dev: Consumer device.
962 * mark the link as "consumer probe in progress" to make the supplier removal
1202 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1205 * consumer probe returns first. Skip them here. in device_links_driver_bound()
1215 driver_deferred_probe_add(link->consumer); in device_links_driver_bound()
1323 * "consumer probe" or "active", it must have been added by in device_links_no_driver()
1324 * a probing consumer while this device was still probing. in device_links_no_driver()
1362 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1383 * Check each consumer of the device and return 'true' if its link's status
1384 * is one of "consumer probe" or "active" (meaning that the given consumer is
1386 * state to "supplier unbind" to prevent the consumer from being probed
1423 * "consumer probe" state, wait for all device probes in progress to complete
1427 * and check if the link was in the "active" state. If so, force the consumer
1428 * driver to unbind and start over (the consumer will not re-probe as we have
1456 struct device *consumer = link->consumer; in device_links_unbind_consumers() local
1458 get_device(consumer); in device_links_unbind_consumers()
1462 device_release_driver_internal(consumer, NULL, in device_links_unbind_consumers()
1463 consumer->parent); in device_links_unbind_consumers()
1464 put_device(consumer); in device_links_unbind_consumers()
1576 * its consumer etc). When such a cyclic dependency is found, convert all
1601 if (!fw_devlink_relax_cycle(link->consumer, sup)) in fw_devlink_relax_cycle()
1611 dev_dbg(link->consumer, "Relaxing link with %s\n", in fw_devlink_relax_cycle()
1618 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
1619 * @con - Consumer device for the device link
1622 * This function will try to create a device link between the consumer device
1628 * device link from the consumer to a missing supplier.
1692 * If the supplier's parent is dependent on the consumer, then the in fw_devlink_create_devlink()
1693 * consumer and supplier have a cyclic dependency. Since fw_devlink in fw_devlink_create_devlink()
1697 * this cycle and by treating the fwnode link between the consumer and in fw_devlink_create_devlink()
1725 * This function looks at all the consumer fwnodes of @dev and creates device
1726 * links between the consumer device and @dev (supplier).
1728 * If the consumer device has not been added yet, then this function creates a
1730 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
1731 * sync_state() callback before the real consumer device gets to be added and
1734 * Once device links are created from the real consumer to @dev (supplier), the
1748 con_dev = get_dev_from_fwnode(link->consumer); in __fw_devlink_link_to_consumers()
1750 * If consumer device is not available yet, make a "proxy" in __fw_devlink_link_to_consumers()
1751 * SYNC_STATE_ONLY link from the consumer's parent device to in __fw_devlink_link_to_consumers()
1754 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
1757 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
1760 con_dev = fwnode_get_next_parent_dev(link->consumer); in __fw_devlink_link_to_consumers()
1762 * However, if the consumer's parent device is also the in __fw_devlink_link_to_consumers()
1764 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
1793 * @dev - The consumer device that needs to be linked to its suppliers
1797 * @fwnode and creates device links between @dev (consumer) and all the
1811 * @dev (consumer) and these suppliers to make sure they don't execute their
1815 * between the real consumer and supplier devices.
1868 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()