Lines Matching full:links

48 /* Device links support. */
68 * Attempts to create duplicate links between the same pair of fwnode handles
102 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
103 * @fwnode: fwnode whose supplier links need to be deleted
105 * Deletes all supplier links connecting directly to @fwnode.
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.
140 * fwnode_links_purge - Delete all links connected to a fwnode_handle.
141 * @fwnode: fwnode whose links needs to be deleted
143 * Deletes all links connecting directly to a fwnode.
155 /* Don't purge consumer links of an added child */ in fw_devlink_purge_absent_suppliers()
282 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_is_dependent()
301 switch (supplier->links.status) { in device_link_init_status()
303 switch (consumer->links.status) { in device_link_init_status()
320 switch (consumer->links.status) { in device_link_init_status()
356 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_reorder_to_tail()
713 * SYNC_STATE_ONLY links are useless once a consumer device has probed. 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()
731 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_add()
835 list_add_tail_rcu(&link->s_node, &supplier->links.consumers); in device_link_add()
836 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers); in device_link_add()
895 * Care is required for hotplugged devices: Their links are purged on removal
923 list_for_each_entry(link, &supplier->links.consumers, s_node) { in device_link_remove()
938 list_for_each_entry(link, &dev->links.suppliers, c_node) { in device_links_missing_supplier()
942 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in device_links_missing_supplier()
955 * Check links from this device to any suppliers. Walk the list of the device's
956 * links to suppliers and see if all of them are available. If not, simply
961 * that function checks the device's links to consumers. This means we need to
965 * Links without the DL_FLAG_MANAGED flag set are ignored.
990 list_for_each_entry(link, &dev->links.suppliers, c_node) { in device_links_check_suppliers()
1004 dev->links.status = DL_DEV_PROBING; in device_links_check_suppliers()
1015 * Queues a device for a sync_state() callback when the device links write lock
1016 * isn't held. This allows the sync_state() execution flow to use device links
1038 list_for_each_entry(link, &dev->links.consumers, s_node) { in __device_links_queue_sync_state()
1052 if (WARN_ON(!list_empty(&dev->links.defer_sync))) in __device_links_queue_sync_state()
1056 list_add_tail(&dev->links.defer_sync, list); in __device_links_queue_sync_state()
1074 list_for_each_entry_safe(dev, tmp, list, links.defer_sync) { in device_links_flush_sync_list()
1075 list_del_init(&dev->links.defer_sync); in device_links_flush_sync_list()
1113 list_for_each_entry_safe(dev, tmp, &deferred_sync, links.defer_sync) { in device_links_supplier_sync_state_resume()
1118 list_del_init(&dev->links.defer_sync); in device_links_supplier_sync_state_resume()
1136 if (list_empty(&sup->links.defer_sync) && dev_has_sync_state(sup)) in __device_links_supplier_defer_sync()
1137 list_add_tail(&sup->links.defer_sync, &deferred_sync); in __device_links_supplier_defer_sync()
1161 * device_links_driver_bound - Update device links after probing its driver.
1162 * @dev: Device to update the links for.
1164 * The probe has been successful, so update links from this device to any
1167 * Also change the status of @dev's links to suppliers to "active".
1169 * Links without the DL_FLAG_MANAGED flag set are ignored.
1178 * the device links it needs to or make new device links as it needs in device_links_driver_bound()
1179 * them. So, fw_devlink no longer needs to create device links to any in device_links_driver_bound()
1197 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_driver_bound()
1202 * Links created during consumer probe may be in the "consumer in device_links_driver_bound()
1223 list_for_each_entry_safe(link, ln, &dev->links.suppliers, c_node) { in device_links_driver_bound()
1254 dev->links.status = DL_DEV_DRIVER_BOUND; in device_links_driver_bound()
1262 * __device_links_no_driver - Update links of a device without a driver.
1265 * Delete all non-persistent links from this device to any suppliers.
1267 * Persistent links stay around, but their status is changed to "available",
1271 * Links without the DL_FLAG_MANAGED flag set are ignored.
1277 list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) { in __device_links_no_driver()
1290 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { in __device_links_no_driver()
1298 dev->links.status = DL_DEV_NO_DRIVER; in __device_links_no_driver()
1302 * device_links_no_driver - Update links after failing driver probe.
1305 * Clean up leftover links to consumers for @dev and invoke
1306 * %__device_links_no_driver() to update links to suppliers for it as
1309 * Links without the DL_FLAG_MANAGED flag set are ignored.
1317 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_no_driver()
1339 * device_links_driver_cleanup - Update links after driver removal.
1342 * Update links to consumers for @dev by changing their status to "dormant" and
1343 * invoke %__device_links_no_driver() to update links to suppliers for it as
1346 * Links without the DL_FLAG_MANAGED flag set are ignored.
1354 list_for_each_entry_safe(link, ln, &dev->links.consumers, s_node) { in device_links_driver_cleanup()
1362 * autoremove the links between this @dev and its consumer in device_links_driver_cleanup()
1373 list_del_init(&dev->links.defer_sync); in device_links_driver_cleanup()
1380 * device_links_busy - Check if there are any busy links to consumers.
1391 * Links without the DL_FLAG_MANAGED flag set are ignored.
1400 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_busy()
1412 dev->links.status = DL_DEV_UNBINDING; in device_links_busy()
1422 * Walk the list of links to consumers for @dev and if any of them is in the
1431 * Links without the DL_FLAG_MANAGED flag set are ignored.
1440 list_for_each_entry(link, &dev->links.consumers, s_node) { in device_links_unbind_consumers()
1473 * device_links_purge - Delete existing links to other devices.
1484 * Delete all of the remaining links from this device to any other in device_links_purge()
1489 list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) { in device_links_purge()
1494 list_for_each_entry_safe_reverse(link, ln, &dev->links.consumers, s_node) { in device_links_purge()
1571 * fw_devlink_relax_cycle - Convert cyclic links to SYNC_STATE_ONLY links
1577 * device links created solely by fw_devlink into SYNC_STATE_ONLY device links.
1596 list_for_each_entry(link, &con->links.consumers, s_node) { in fw_devlink_relax_cycle()
1626 * fwnode links can sometimes cause the supplier device to never be created.
1649 if (sup_dev->links.status == DL_DEV_NO_DRIVER && in fw_devlink_create_devlink()
1656 * If this fails, it is due to cycles in device links. Just in fw_devlink_create_devlink()
1696 * dependency. Do this by relaxing all the fw_devlink device links in in fw_devlink_create_devlink()
1722 * __fw_devlink_link_to_consumers - Create device links to consumers of a device
1726 * links between the consumer device and @dev (supplier).
1734 * Once device links are created from the real consumer to @dev (supplier), the
1735 * fwnode links are deleted.
1792 * __fw_devlink_link_to_suppliers - Create device links to suppliers of a device
1794 * @fwnode - Root of the fwnode tree that is used to create device links
1797 * @fwnode and creates device links between @dev (consumer) and all the
1800 * The function creates normal (non-SYNC_STATE_ONLY) device links between @dev
1801 * and the real suppliers of @dev. Once these device links are created, the
1802 * fwnode links are deleted. When such device links are successfully created,
1804 * needed to detect and break some invalid cycles in fwnode links. See
1810 * driver core. So, this function creates SYNC_STATE_ONLY device links between
1813 * their device links. The fwnode links that correspond to the child devices
1814 * aren't delete because they are needed later to create the device links
1852 * fwnode links that haven't been converted to a device link in __fw_devlink_link_to_suppliers()
1858 * dependency fwnode links to be converted to device links. in __fw_devlink_link_to_suppliers()
1866 * Make "proxy" SYNC_STATE_ONLY device links to represent the needs of in __fw_devlink_link_to_suppliers()
1890 /* Device links support end. */
2741 INIT_LIST_HEAD(&dev->links.consumers); in device_initialize()
2742 INIT_LIST_HEAD(&dev->links.suppliers); in device_initialize()
2743 INIT_LIST_HEAD(&dev->links.defer_sync); in device_initialize()
2744 dev->links.status = DL_DEV_NO_DRIVER; in device_initialize()