summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
authorRob Barnes <robbarnes@google.com>2020-07-23 08:25:42 -0600
committerPatrick Georgi <pgeorgi@google.com>2020-07-28 19:28:22 +0000
commita223e65db2e9d4c82bb8aac29281500b8e645a97 (patch)
tree8222b0e26679d67f73085fdd247771ac1c4aeba5 /src/include/device
parente7e6c4e1d78c78e4bf5869d2329949bdaf80ad56 (diff)
downloadcoreboot-a223e65db2e9d4c82bb8aac29281500b8e645a97.tar.xz
device: Add find_dev_nested_path helper function
Add find_dev_nested_path helper function to simplify finding deeply nested devices. BUG=b:157580724 TEST=Find bluetooth device on dalboz Change-Id: I48fa5fcad0030fb6dcea97b9fc76e1d3d3f9b28f Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43776 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 317785429d..b53b64a329 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -207,6 +207,10 @@ void run_bios(struct device *dev, unsigned long addr);
DEVTREE_CONST struct device *find_dev_path(
const struct bus *parent,
const struct device_path *path);
+DEVTREE_CONST struct device *find_dev_nested_path(
+ const struct bus *parent,
+ const struct device_path nested_path[],
+ size_t nested_path_length);
struct device *alloc_find_dev(struct bus *parent, struct device_path *path);
struct device *dev_find_device(u16 vendor, u16 device, struct device *from);
struct device *dev_find_class(unsigned int class, struct device *from);