Lines Matching full:consumer
59 * @con: Consumer end of the link.
82 if (link->consumer == con) in fwnode_link_add()
93 link->consumer = con; in fwnode_link_add()
98 pr_debug("%pfwP Linked as a fwnode consumer to %pfwP\n", in fwnode_link_add()
115 link->consumer, link->supplier); in __fwnode_link_del()
138 * fwnode_links_purge_consumers - Delete all consumer links of fwnode_handle.
139 * @fwnode: fwnode whose consumer links need to be deleted
141 * Deletes all consumer links connecting directly to @fwnode.
169 /* Don't purge consumer links of an added child */ in fw_devlink_purge_absent_suppliers()
278 * its consumer etc). Return 1 if that is the case or 0 otherwise.
302 if (link->consumer == target) in device_is_dependent()
305 ret = device_is_dependent(link->consumer, target); in device_is_dependent()
313 struct device *consumer, in device_link_init_status() argument
318 switch (consumer->links.status) { in device_link_init_status()
321 * A consumer driver can create a link to a supplier in device_link_init_status()
335 switch (consumer->links.status) { in device_link_init_status()
375 device_reorder_to_tail(link->consumer, NULL); in device_reorder_to_tail()
419 output = "consumer probing"; in status_show()
445 output = "consumer unbind"; in auto_remove_on_show()
491 put_device(link->consumer); in device_link_release_fn()
503 * synchronization in device_link_release_fn() and if the consumer or in devlink_dev_release()
524 struct device *con = link->consumer; in devlink_add_symlinks()
539 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); in devlink_add_symlinks()
543 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
556 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
559 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_add_symlinks()
573 struct device *con = link->consumer; in devlink_remove_symlinks()
576 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_remove_symlinks()
593 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_remove_symlinks()
631 * @consumer: Consumer end of the link.
654 * after unbinding the consumer or supplier driver, respectively, from its
657 * the consumer or the supplier) is unregistered.
662 * be used to request the driver core to automatically probe for a consumer
668 * However, if a device link between the given @consumer and @supplier pair
677 * devices_kset list by moving the consumer device and all devices depending
682 * and NULL will be returned if that is not the case. The consumer device need
685 struct device_link *device_link_add(struct device *consumer, in device_link_add() argument
690 if (!consumer || !supplier || consumer == supplier || in device_link_add()
715 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and in device_link_add()
722 device_is_dependent(consumer, supplier))) { in device_link_add()
728 * SYNC_STATE_ONLY links are useless once a consumer device has probed. in device_link_add()
729 * So, only create it if the consumer hasn't probed yet. in device_link_add()
732 consumer->links.status != DL_DEV_NO_DRIVER && in device_link_add()
733 consumer->links.status != DL_DEV_PROBING) { in device_link_add()
747 if (link->consumer != consumer) in device_link_add()
756 pm_runtime_new_link(consumer); in device_link_add()
792 device_link_init_status(link, consumer, supplier); in device_link_add()
812 get_device(consumer); in device_link_add()
813 link->consumer = consumer; in device_link_add()
822 dev_bus_name(consumer), dev_name(consumer)); in device_link_add()
824 put_device(consumer); in device_link_add()
835 pm_runtime_new_link(consumer); in device_link_add()
842 device_link_init_status(link, consumer, supplier); in device_link_add()
845 * Some callers expect the link creation during consumer driver probe to in device_link_add()
853 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
856 dev_dbg(consumer, in device_link_add()
857 "Linked as a sync state only consumer to %s\n", in device_link_add()
864 * Move the consumer and all of the devices depending on it to the end in device_link_add()
870 device_reorder_to_tail(consumer, NULL); in device_link_add()
872 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
889 dev_dbg(link->consumer, "Dropping the link to %s\n", in __device_link_del()
902 else if (!device_is_registered(link->consumer)) in device_link_put_kref()
927 * @consumer: Consumer end of the link.
933 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
937 if (WARN_ON(consumer == supplier)) in device_link_remove()
943 if (link->consumer == consumer) { in device_link_remove()
972 * @dev: Consumer device.
981 * mark the link as "consumer probe in progress" to make the supplier removal
1184 * @dev: Consumer device.
1187 * driver probe functions. So the consumer really isn't going to wait for any
1259 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1262 * consumer probe returns first. Skip them here. in device_links_driver_bound()
1272 driver_deferred_probe_add(link->consumer); in device_links_driver_bound()
1380 * "consumer probe" or "active", it must have been added by in device_links_no_driver()
1381 * a probing consumer while this device was still probing. in device_links_no_driver()
1419 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1440 * Check each consumer of the device and return 'true' if its link's status
1441 * is one of "consumer probe" or "active" (meaning that the given consumer is
1443 * state to "supplier unbind" to prevent the consumer from being probed
1480 * "consumer probe" state, wait for all device probes in progress to complete
1484 * and check if the link was in the "active" state. If so, force the consumer
1485 * driver to unbind and start over (the consumer will not re-probe as we have
1513 struct device *consumer = link->consumer; in device_links_unbind_consumers() local
1515 get_device(consumer); in device_links_unbind_consumers()
1519 device_release_driver_internal(consumer, NULL, in device_links_unbind_consumers()
1520 consumer->parent); in device_links_unbind_consumers()
1521 put_device(consumer); in device_links_unbind_consumers()
1637 dev_dbg(link->consumer, "Relaxing link with %s\n", in fw_devlink_relax_link()
1679 * its consumer etc). When such a cyclic dependency is found, convert all
1704 if (!fw_devlink_relax_cycle(link->consumer, sup)) in fw_devlink_relax_cycle()
1715 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
1716 * @con: consumer device for the device link
1720 * This function will try to create a device link between the consumer device
1726 * device link from the consumer to a missing supplier.
1809 * If the supplier's parent is dependent on the consumer, then the in fw_devlink_create_devlink()
1810 * consumer and supplier have a cyclic dependency. Since fw_devlink in fw_devlink_create_devlink()
1814 * this cycle and by treating the fwnode link between the consumer and in fw_devlink_create_devlink()
1842 * This function looks at all the consumer fwnodes of @dev and creates device
1843 * links between the consumer device and @dev (supplier).
1845 * If the consumer device has not been added yet, then this function creates a
1847 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
1848 * sync_state() callback before the real consumer device gets to be added and
1851 * Once device links are created from the real consumer to @dev (supplier), the
1865 con_dev = get_dev_from_fwnode(link->consumer); in __fw_devlink_link_to_consumers()
1867 * If consumer device is not available yet, make a "proxy" in __fw_devlink_link_to_consumers()
1868 * SYNC_STATE_ONLY link from the consumer's parent device to in __fw_devlink_link_to_consumers()
1871 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
1874 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
1877 con_dev = fwnode_get_next_parent_dev(link->consumer); in __fw_devlink_link_to_consumers()
1879 * However, if the consumer's parent device is also the in __fw_devlink_link_to_consumers()
1881 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
1908 * @dev: The consumer device that needs to be linked to its suppliers
1912 * @fwnode and creates device links between @dev (consumer) and all the
1926 * @dev (consumer) and these suppliers to make sure they don't execute their
1930 * between the real consumer and supplier devices.
1981 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3401 * case the consumer device is able to operate without this supplier. in device_add()