summaryrefslogtreecommitdiff
path: root/doc/driver-model
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-07-23 06:55:19 -0600
committerSimon Glass <sjg@chromium.org>2014-07-23 14:08:37 +0100
commit997c87bb0b1981fd33e34cefc26d9138f27326ce (patch)
tree450a1bc245f3c0984cf4827b6dd43c3948dafcdb /doc/driver-model
parent1ca7e2062b4e8c3b211753dcb19c063b5b9b73ca (diff)
dm: Add functions to access a device's children
Devices can have childen that can be addressed by a simple index, the sequence number or a device tree offset. Add functions to access a child in each of these ways. The index is typically used as a fallback when the sequence number is not available. For example we may use a serial UART with sequence number 0 as the console, but if no UART has sequence number 0, then we can fall back to just using the first UART (index 0). The device tree offset function is useful for buses, where they want to locate one of their children. The device tree can be scanned to find the offset of each child, and that offset can then find the device. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/driver-model')
-rw-r--r--doc/driver-model/README.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index a2b6122ebcb..59ef05cf2b5 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -95,13 +95,14 @@ are provided in test/dm. To run them, try:
You should see something like this:
<...U-Boot banner...>
- Running 18 driver model tests
+ Running 19 driver model tests
Test: dm_test_autobind
Test: dm_test_autoprobe
Test: dm_test_bus_children
Device 'd-test': seq 3 is in use by 'b-test'
Device 'c-test@0': seq 0 is in use by 'a-test'
Device 'c-test@1': seq 1 is in use by 'd-test'
+ Test: dm_test_bus_children_funcs
Test: dm_test_children
Test: dm_test_fdt
Device 'd-test': seq 3 is in use by 'b-test'