summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2019-09-05 00:11:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 18:29:50 +0300
commite2ae9bcc4aaacda04edb75c4eea93384719efaa5 (patch)
tree9c01d02d0a1e67c4de38c94e27180f9411fc850d /Documentation
parent372a67c0c5ef63f55bd1eb480d9555328d8ec0f2 (diff)
downloadlinux-e2ae9bcc4aaacda04edb75c4eea93384719efaa5.tar.xz
driver core: Add support for linking devices during device addition
The firmware corresponding to a device (dev.fwnode) might be able to provide functional dependency information between a device and its supplier and consumer devices. Tracking this functional dependency allows optimizing device probe order and informing a supplier when all its consumers have probed (and thereby actively managing their resources). The existing device links feature allows tracking and using supplier-consumer relationships. So, this patch adds the add_links() fwnode callback to allow firmware to create device links for each device as the device is added. However, when consumer devices are added, they might not have a supplier device to link to despite needing mandatory resources/functionality from one or more suppliers. A waiting_for_suppliers list is created to track such consumers and retry linking them when new devices get added. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20190904211126.47518-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/driver-api/device_link.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/driver-api/device_link.rst b/Documentation/driver-api/device_link.rst
index 1b5020ec6517..bc2d89af88ce 100644
--- a/Documentation/driver-api/device_link.rst
+++ b/Documentation/driver-api/device_link.rst
@@ -281,7 +281,8 @@ State machine
:c:func:`driver_bound()`.)
* Before a consumer device is probed, presence of supplier drivers is
- verified by checking that links to suppliers are in ``DL_STATE_AVAILABLE``
+ verified by checking the consumer device is not in the wait_for_suppliers
+ list and by checking that links to suppliers are in ``DL_STATE_AVAILABLE``
state. The state of the links is updated to ``DL_STATE_CONSUMER_PROBE``.
(Call to :c:func:`device_links_check_suppliers()` from
:c:func:`really_probe()`.)