Lines Matching full:consumer
61 * @con: Consumer end of the link.
84 if (link->consumer == con) in fwnode_link_add()
95 link->consumer = con; in fwnode_link_add()
100 pr_debug("%pfwP Linked as a fwnode consumer to %pfwP\n", in fwnode_link_add()
117 link->consumer, link->supplier); in __fwnode_link_del()
140 * fwnode_links_purge_consumers - Delete all consumer links of fwnode_handle.
141 * @fwnode: fwnode whose consumer links need to be deleted
143 * Deletes all consumer links connecting directly to @fwnode.
171 /* Don't purge consumer links of an added child */ in fw_devlink_purge_absent_suppliers()
280 * its consumer etc). Return 1 if that is the case or 0 otherwise.
304 if (link->consumer == target) in device_is_dependent()
307 ret = device_is_dependent(link->consumer, target); in device_is_dependent()
315 struct device *consumer, in device_link_init_status() argument
320 switch (consumer->links.status) { in device_link_init_status()
323 * A consumer driver can create a link to a supplier in device_link_init_status()
337 switch (consumer->links.status) { in device_link_init_status()
377 device_reorder_to_tail(link->consumer, NULL); in device_reorder_to_tail()
421 output = "consumer probing"; in status_show()
447 output = "consumer unbind"; in auto_remove_on_show()
503 put_device(link->consumer); in device_link_release_fn()
515 * synchronization in device_link_release_fn() and if the consumer or in devlink_dev_release()
536 struct device *con = link->consumer; in devlink_add_symlinks()
551 ret = sysfs_create_link(&link->link_dev.kobj, &con->kobj, "consumer"); in devlink_add_symlinks()
555 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
568 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_add_symlinks()
571 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_add_symlinks()
585 struct device *con = link->consumer; in devlink_remove_symlinks()
588 sysfs_remove_link(&link->link_dev.kobj, "consumer"); in devlink_remove_symlinks()
605 snprintf(buf, len, "consumer:%s:%s", dev_bus_name(con), dev_name(con)); in devlink_remove_symlinks()
643 * @consumer: Consumer end of the link.
666 * after unbinding the consumer or supplier driver, respectively, from its
669 * the consumer or the supplier) is unregistered.
674 * be used to request the driver core to automatically probe for a consumer
680 * However, if a device link between the given @consumer and @supplier pair
689 * devices_kset list by moving the consumer device and all devices depending
694 * and NULL will be returned if that is not the case. The consumer device need
697 struct device_link *device_link_add(struct device *consumer, in device_link_add() argument
702 if (!consumer || !supplier || consumer == supplier || in device_link_add()
727 * reverse (non-SYNC_STATE_ONLY) dependency between the consumer and in device_link_add()
734 device_is_dependent(consumer, supplier))) { in device_link_add()
740 * SYNC_STATE_ONLY links are useless once a consumer device has probed. in device_link_add()
741 * So, only create it if the consumer hasn't probed yet. in device_link_add()
744 consumer->links.status != DL_DEV_NO_DRIVER && in device_link_add()
745 consumer->links.status != DL_DEV_PROBING) { in device_link_add()
759 if (link->consumer != consumer) in device_link_add()
768 pm_runtime_new_link(consumer); in device_link_add()
804 device_link_init_status(link, consumer, supplier); in device_link_add()
824 get_device(consumer); in device_link_add()
825 link->consumer = consumer; in device_link_add()
834 dev_bus_name(consumer), dev_name(consumer)); in device_link_add()
845 pm_runtime_new_link(consumer); in device_link_add()
852 device_link_init_status(link, consumer, supplier); in device_link_add()
855 * Some callers expect the link creation during consumer driver probe to in device_link_add()
863 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
866 dev_dbg(consumer, in device_link_add()
867 "Linked as a sync state only consumer to %s\n", in device_link_add()
874 * Move the consumer and all of the devices depending on it to the end in device_link_add()
880 device_reorder_to_tail(consumer, NULL); in device_link_add()
882 dev_dbg(consumer, "Linked as a consumer to %s\n", dev_name(supplier)); in device_link_add()
899 dev_dbg(link->consumer, "Dropping the link to %s\n", in __device_link_del()
912 else if (!device_is_registered(link->consumer)) in device_link_put_kref()
937 * @consumer: Consumer end of the link.
943 void device_link_remove(void *consumer, struct device *supplier) in device_link_remove() argument
947 if (WARN_ON(consumer == supplier)) in device_link_remove()
953 if (link->consumer == consumer) { in device_link_remove()
988 * @dev: Consumer device.
997 * mark the link as "consumer probe in progress" to make the supplier removal
1214 * @dev: Consumer device.
1217 * driver probe functions. So the consumer really isn't going to wait for any
1289 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1292 * consumer probe returns first. Skip them here. in device_links_driver_bound()
1302 driver_deferred_probe_add(link->consumer); in device_links_driver_bound()
1331 * consumer device still managed to probe, there's no in device_links_driver_bound()
1333 * (consumer probed before supplier). So delete it. in device_links_driver_bound()
1422 * "consumer probe" or "active", it must have been added by in device_links_no_driver()
1423 * a probing consumer while this device was still probing. in device_links_no_driver()
1461 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1482 * Check each consumer of the device and return 'true' if its link's status
1483 * is one of "consumer probe" or "active" (meaning that the given consumer is
1485 * state to "supplier unbind" to prevent the consumer from being probed
1522 * "consumer probe" state, wait for all device probes in progress to complete
1526 * and check if the link was in the "active" state. If so, force the consumer
1527 * driver to unbind and start over (the consumer will not re-probe as we have
1555 struct device *consumer = link->consumer; in device_links_unbind_consumers() local
1557 get_device(consumer); in device_links_unbind_consumers()
1561 device_release_driver_internal(consumer, NULL, in device_links_unbind_consumers()
1562 consumer->parent); in device_links_unbind_consumers()
1563 put_device(consumer); in device_links_unbind_consumers()
1679 dev_dbg(link->consumer, "Relaxing link with %s\n", in fw_devlink_relax_link()
1777 * its consumer etc). When such a cyclic dependency is found, convert all
1802 if (!fw_devlink_relax_cycle(link->consumer, sup)) in fw_devlink_relax_cycle()
1813 * fw_devlink_create_devlink - Create a device link from a consumer to fwnode
1814 * @con: consumer device for the device link
1818 * This function will try to create a device link between the consumer device
1824 * device link from the consumer to a missing supplier.
1907 * If the supplier's parent is dependent on the consumer, then the in fw_devlink_create_devlink()
1908 * consumer and supplier have a cyclic dependency. Since fw_devlink in fw_devlink_create_devlink()
1912 * this cycle and by treating the fwnode link between the consumer and in fw_devlink_create_devlink()
1940 * This function looks at all the consumer fwnodes of @dev and creates device
1941 * links between the consumer device and @dev (supplier).
1943 * If the consumer device has not been added yet, then this function creates a
1945 * of the consumer fwnode. This is necessary to make sure @dev doesn't get a
1946 * sync_state() callback before the real consumer device gets to be added and
1949 * Once device links are created from the real consumer to @dev (supplier), the
1963 con_dev = get_dev_from_fwnode(link->consumer); in __fw_devlink_link_to_consumers()
1965 * If consumer device is not available yet, make a "proxy" in __fw_devlink_link_to_consumers()
1966 * SYNC_STATE_ONLY link from the consumer's parent device to in __fw_devlink_link_to_consumers()
1969 * consumer can create a device link to the supplier. in __fw_devlink_link_to_consumers()
1972 * consumer's parent device is added before the supplier. in __fw_devlink_link_to_consumers()
1975 con_dev = fwnode_get_next_parent_dev(link->consumer); in __fw_devlink_link_to_consumers()
1977 * However, if the consumer's parent device is also the in __fw_devlink_link_to_consumers()
1979 * consumer-supplier link from the parent to its child in __fw_devlink_link_to_consumers()
2006 * @dev: The consumer device that needs to be linked to its suppliers
2010 * @fwnode and creates device links between @dev (consumer) and all the
2024 * @dev (consumer) and these suppliers to make sure they don't execute their
2028 * between the real consumer and supplier devices.
2079 * case where the supplier is added before the consumer's parent device in __fw_devlink_link_to_suppliers()
3522 * case the consumer device is able to operate without this supplier. in device_add()