Lines Matching refs:links

39 /* Device links support. */
64 * Attempts to create duplicate links between the same pair of fwnode handles
136 * fwnode_links_purge_suppliers - Delete all supplier links of fwnode_handle.
137 * @fwnode: fwnode whose supplier links need to be deleted
139 * Deletes all supplier links connecting directly to @fwnode.
152 * fwnode_links_purge_consumers - Delete all consumer links of fwnode_handle.
153 * @fwnode: fwnode whose consumer links need to be deleted
155 * Deletes all consumer links connecting directly to @fwnode.
168 * fwnode_links_purge - Delete all links connected to a fwnode_handle.
169 * @fwnode: fwnode whose links needs to be deleted
171 * Deletes all links connecting directly to a fwnode.
183 /* Don't purge consumer links of an added child */
200 * Move all consumer links from @from fwnode to @to fwnode.
220 * MANAGED device links to this device, so leave @fwnode and its descendant's
221 * fwnode links alone.
322 list_for_each_entry(link, &dev->links.consumers, s_node) {
340 switch (supplier->links.status) {
342 switch (consumer->links.status) {
359 switch (consumer->links.status) {
395 list_for_each_entry(link, &dev->links.consumers, s_node) {
775 * SYNC_STATE_ONLY links are useless once a consumer device has probed.
779 consumer->links.status != DL_DEV_NO_DRIVER &&
780 consumer->links.status != DL_DEV_PROBING) {
793 list_for_each_entry(link, &supplier->links.consumers, s_node) {
897 list_add_tail_rcu(&link->s_node, &supplier->links.consumers);
898 list_add_tail_rcu(&link->c_node, &consumer->links.suppliers);
959 * Care is required for hotplugged devices: Their links are purged on removal
987 list_for_each_entry(link, &supplier->links.consumers, s_node) {
1002 list_for_each_entry(link, &dev->links.suppliers, c_node) {
1006 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
1041 * Check links from this device to any suppliers. Walk the list of the device's
1042 * links to suppliers and see if all of them are available. If not, simply
1047 * that function checks the device's links to consumers. This means we need to
1080 list_for_each_entry(link, &dev->links.suppliers, c_node) {
1103 dev->links.status = DL_DEV_PROBING;
1115 * Queues a device for a sync_state() callback when the device links write lock
1116 * isn't held. This allows the sync_state() execution flow to use device links
1138 list_for_each_entry(link, &dev->links.consumers, s_node) {
1152 if (WARN_ON(!list_empty(&dev->links.defer_sync)))
1156 list_add_tail(&dev->links.defer_sync, list);
1174 list_for_each_entry_safe(dev, tmp, list, links.defer_sync) {
1175 list_del_init(&dev->links.defer_sync);
1210 list_for_each_entry_safe(dev, tmp, &deferred_sync, links.defer_sync) {
1215 list_del_init(&dev->links.defer_sync);
1233 if (list_empty(&sup->links.defer_sync) && dev_has_sync_state(sup))
1234 list_add_tail(&sup->links.defer_sync, &deferred_sync);
1269 * supplier device links and checks if the supplier is bound. If it is, then
1279 list_for_each_entry_safe(link, ln, &dev->links.suppliers, c_node) {
1289 dev->links.status = DL_DEV_PROBING;
1295 * device_links_driver_bound - Update device links after probing its driver.
1296 * @dev: Device to update the links for.
1298 * The probe has been successful, so update links from this device to any
1301 * Also change the status of @dev's links to suppliers to "active".
1312 * the device links it needs to or make new device links as it needs
1313 * them. So, fw_devlink no longer needs to create device links to any
1338 list_for_each_entry(link, &dev->links.consumers, s_node) {
1364 list_for_each_entry_safe(link, ln, &dev->links.suppliers, c_node) {
1384 * links to suppliers that don't have a driver. If the
1407 dev->links.status = DL_DEV_DRIVER_BOUND;
1415 * __device_links_no_driver - Update links of a device without a driver.
1418 * Delete all non-persistent links from this device to any suppliers.
1420 * Persistent links stay around, but their status is changed to "available",
1430 list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) {
1443 if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) {
1451 dev->links.status = DL_DEV_NO_DRIVER;
1455 * device_links_no_driver - Update links after failing driver probe.
1458 * Clean up leftover links to consumers for @dev and invoke
1459 * %__device_links_no_driver() to update links to suppliers for it as
1470 list_for_each_entry(link, &dev->links.consumers, s_node) {
1492 * device_links_driver_cleanup - Update links after driver removal.
1495 * Update links to consumers for @dev by changing their status to "dormant" and
1496 * invoke %__device_links_no_driver() to update links to suppliers for it as
1507 list_for_each_entry_safe(link, ln, &dev->links.consumers, s_node) {
1515 * autoremove the links between this @dev and its consumer
1526 list_del_init(&dev->links.defer_sync);
1533 * device_links_busy - Check if there are any busy links to consumers.
1553 list_for_each_entry(link, &dev->links.consumers, s_node) {
1565 dev->links.status = DL_DEV_UNBINDING;
1575 * Walk the list of links to consumers for @dev and if any of them is in the
1593 list_for_each_entry(link, &dev->links.consumers, s_node) {
1626 * device_links_purge - Delete existing links to other devices.
1637 * Delete all of the remaining links from this device to any other
1642 list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) {
1647 list_for_each_entry_safe_reverse(link, ln, &dev->links.consumers, s_node) {
1800 if (!list_empty(&sup->links.defer_sync))
1806 list_add_tail(&sup->links.defer_sync, data);
1886 list_for_each_entry(link, &dev->links.consumers, s_node)
1902 ret = !dev || dev->links.status == DL_DEV_NO_DRIVER;
1988 * and @con. When such dependency cycles are found, convert all device links
1989 * created solely by fw_devlink into SYNC_STATE_ONLY device links. Also, mark
1990 * all fwnode links in the cycle with FWLINK_FLAG_CYCLE so that when they are
1992 * SYNC_STATE_ONLY device links. This is the equivalent of doing
2033 if (sup_dev && sup_dev->links.status == DL_DEV_DRIVER_BOUND &&
2034 con->links.status == DL_DEV_NO_DRIVER) {
2067 list_for_each_entry(dev_link, &sup_dev->links.suppliers, c_node) {
2103 * fwnode links can sometimes cause the supplier device to never be created.
2141 * When such a flag is set, we can't create device links where P is the
2149 * SYNC_STATE_ONLY device links don't block probing and supports cycles.
2180 if (sup_dev->links.status == DL_DEV_NO_DRIVER &&
2216 * __fw_devlink_link_to_consumers - Create device links to consumers of a device
2220 * links between the consumer device and @dev (supplier).
2228 * Once device links are created from the real consumer to @dev (supplier), the
2229 * fwnode links are deleted.
2282 * __fw_devlink_link_to_suppliers - Create device links to suppliers of a device
2284 * @fwnode: Root of the fwnode tree that is used to create device links
2287 * @fwnode and creates device links between @dev (consumer) and all the
2290 * The function creates normal (non-SYNC_STATE_ONLY) device links between @dev
2291 * and the real suppliers of @dev. Once these device links are created, the
2292 * fwnode links are deleted.
2297 * driver core. So, this function creates SYNC_STATE_ONLY device links between
2300 * their device links. The fwnode links that correspond to the child devices
2301 * aren't delete because they are needed later to create the device links
2323 * Make "proxy" SYNC_STATE_ONLY device links to represent the needs of
2347 /* Device links support end. */
3198 INIT_LIST_HEAD(&dev->links.consumers);
3199 INIT_LIST_HEAD(&dev->links.suppliers);
3200 INIT_LIST_HEAD(&dev->links.defer_sync);
3201 dev->links.status = DL_DEV_NO_DRIVER;