Lines Matching full:links
50 /* Device links support. */
71 * Attempts to create duplicate links between the same pair of fwnode handles
122 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
123 * @fwnode: fwnode whose supplier links need to be deleted
125 * Deletes all supplier links connecting directly to @fwnode.
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.
154 * fwnode_links_purge - Delete all links connected to a fwnode_handle.
155 * @fwnode: fwnode whose links needs to be deleted
157 * Deletes all links connecting directly to a fwnode.
169 /* Don't purge consumer links of an added child */ in fw_devlink_purge_absent_suppliers()
297 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_is_dependent()
316 switch (supplier->links.status) { in device_link_init_status()
318 switch (consumer->links.status) { in device_link_init_status()
335 switch (consumer->links.status) { in device_link_init_status()
371 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_reorder_to_tail()
728 * SYNC_STATE_ONLY links are useless once a consumer device has probed. 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()
746 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
852 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
853 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
914 * Care is required for hotplugged devices: Their links are purged on removal
942 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
957 list_for_each_entry(link, &dev->links.suppliers, c_node) { in device_links_missing_supplier()
961 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
974 * Check links from this device to any suppliers. Walk the list of the device's
975 * links to suppliers and see if all of them are available. If not, simply
980 * that function checks the device's links to consumers. This means we need to
984 * Links without the DL_FLAG_MANAGED flag set are ignored.
1011 list_for_each_entry(link, &dev->links.suppliers, c_node) { in device_links_check_suppliers()
1026 dev->links.status = DL_DEV_PROBING; in device_links_check_suppliers()
1037 * Queues a device for a sync_state() callback when the device links write lock
1038 * isn't held. This allows the sync_state() execution flow to use device links
1060 list_for_each_entry(link, &dev->links.consumers, s_node) { in __device_links_queue_sync_state()
1074 if (WARN_ON(!list_empty(&dev->links.defer_sync))) in __device_links_queue_sync_state()
1078 list_add_tail(&dev->links.defer_sync, list); in __device_links_queue_sync_state()
1096 list_for_each_entry_safe(dev, tmp, list, links.defer_sync) { in device_links_flush_sync_list()
1097 list_del_init(&dev->links.defer_sync); in device_links_flush_sync_list()
1135 list_for_each_entry_safe(dev, tmp, &deferred_sync, links.defer_sync) { in device_links_supplier_sync_state_resume()
1140 list_del_init(&dev->links.defer_sync); in device_links_supplier_sync_state_resume()
1158 if (list_empty(&sup->links.defer_sync) && dev_has_sync_state(sup)) in __device_links_supplier_defer_sync()
1159 list_add_tail(&sup->links.defer_sync, &deferred_sync); in __device_links_supplier_defer_sync()
1192 * supplier device links and checks if the supplier is bound. If it is, then
1194 * is dropped. Links without the DL_FLAG_MANAGED flag set are ignored.
1202 list_for_each_entry_safe(link, ln, &dev->links.suppliers, c_node) { in device_links_force_bind()
1212 dev->links.status = DL_DEV_PROBING; in device_links_force_bind()
1218 * device_links_driver_bound - Update device links after probing its driver.
1219 * @dev: Device to update the links for.
1221 * The probe has been successful, so update links from this device to any
1224 * Also change the status of @dev's links to suppliers to "active".
1226 * Links without the DL_FLAG_MANAGED flag set are ignored.
1235 * the device links it needs to or make new device links as it needs in device_links_driver_bound()
1236 * them. So, fw_devlink no longer needs to create device links to any in device_links_driver_bound()
1254 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_driver_bound()
1259 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1280 list_for_each_entry_safe(link, ln, &dev->links.suppliers, c_node) { in device_links_driver_bound()
1311 dev->links.status = DL_DEV_DRIVER_BOUND; in device_links_driver_bound()
1319 * __device_links_no_driver - Update links of a device without a driver.
1322 * Delete all non-persistent links from this device to any suppliers.
1324 * Persistent links stay around, but their status is changed to "available",
1328 * Links without the DL_FLAG_MANAGED flag set are ignored.
1334 list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) { in __device_links_no_driver()
1347 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1355 dev->links.status = DL_DEV_NO_DRIVER; in __device_links_no_driver()
1359 * device_links_no_driver - Update links after failing driver probe.
1362 * Clean up leftover links to consumers for @dev and invoke
1363 * %__device_links_no_driver() to update links to suppliers for it as
1366 * Links without the DL_FLAG_MANAGED flag set are ignored.
1374 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_no_driver()
1396 * device_links_driver_cleanup - Update links after driver removal.
1399 * Update links to consumers for @dev by changing their status to "dormant" and
1400 * invoke %__device_links_no_driver() to update links to suppliers for it as
1403 * Links without the DL_FLAG_MANAGED flag set are ignored.
1411 list_for_each_entry_safe(link, ln, &dev->links.consumers, s_node) { in device_links_driver_cleanup()
1419 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1430 list_del_init(&dev->links.defer_sync); in device_links_driver_cleanup()
1437 * device_links_busy - Check if there are any busy links to consumers.
1448 * Links without the DL_FLAG_MANAGED flag set are ignored.
1457 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_busy()
1469 dev->links.status = DL_DEV_UNBINDING; in device_links_busy()
1479 * Walk the list of links to consumers for @dev and if any of them is in the
1488 * Links without the DL_FLAG_MANAGED flag set are ignored.
1497 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_unbind_consumers()
1530 * device_links_purge - Delete existing links to other devices.
1541 * Delete all of the remaining links from this device to any other in device_links_purge()
1546 list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) { in device_links_purge()
1551 list_for_each_entry_safe_reverse(link, ln, &dev->links.consumers, s_node) { in device_links_purge()
1668 list_for_each_entry(link, &dev->links.consumers, s_node) in fw_devlink_unblock_consumers()
1674 * fw_devlink_relax_cycle - Convert cyclic links to SYNC_STATE_ONLY links
1680 * device links created solely by fw_devlink into SYNC_STATE_ONLY device links.
1699 list_for_each_entry(link, &con->links.consumers, s_node) { in fw_devlink_relax_cycle()
1724 * fwnode links can sometimes cause the supplier device to never be created.
1752 * When such a flag is set, we can't create device links where P is the in fw_devlink_create_devlink()
1766 if (sup_dev->links.status == DL_DEV_NO_DRIVER && in fw_devlink_create_devlink()
1773 * If this fails, it is due to cycles in device links. Just in fw_devlink_create_devlink()
1813 * dependency. Do this by relaxing all the fw_devlink device links in in fw_devlink_create_devlink()
1839 * __fw_devlink_link_to_consumers - Create device links to consumers of a device
1843 * links between the consumer device and @dev (supplier).
1851 * Once device links are created from the real consumer to @dev (supplier), the
1852 * fwnode links are deleted.
1907 * __fw_devlink_link_to_suppliers - Create device links to suppliers of a device
1909 * @fwnode: Root of the fwnode tree that is used to create device links
1912 * @fwnode and creates device links between @dev (consumer) and all the
1915 * The function creates normal (non-SYNC_STATE_ONLY) device links between @dev
1916 * and the real suppliers of @dev. Once these device links are created, the
1917 * fwnode links are deleted. When such device links are successfully created,
1919 * needed to detect and break some invalid cycles in fwnode links. See
1925 * driver core. So, this function creates SYNC_STATE_ONLY device links between
1928 * their device links. The fwnode links that correspond to the child devices
1929 * aren't delete because they are needed later to create the device links
1965 * fwnode links that haven't been converted to a device link in __fw_devlink_link_to_suppliers()
1971 * dependency fwnode links to be converted to device links. in __fw_devlink_link_to_suppliers()
1979 * Make "proxy" SYNC_STATE_ONLY device links to represent the needs of in __fw_devlink_link_to_suppliers()
2003 /* Device links support end. */
2883 INIT_LIST_HEAD(&dev->links.consumers); in device_initialize()
2884 INIT_LIST_HEAD(&dev->links.suppliers); in device_initialize()
2885 INIT_LIST_HEAD(&dev->links.defer_sync); in device_initialize()
2886 dev->links.status = DL_DEV_NO_DRIVER; in device_initialize()