diff options
author | Simon Glass <sjg@chromium.org> | 2014-11-11 10:46:19 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-22 10:16:47 +0100 |
commit | 479728cb0c752a121e0fd84c6c6d74e93e086905 (patch) | |
tree | 845ec0bba9e72511b1d07522f0cdb89d29b3a65b /include | |
parent | 2ef249b4420818d7ea31a031f48825e5f38ed3ac (diff) | |
download | u-boot-imx-479728cb0c752a121e0fd84c6c6d74e93e086905.zip u-boot-imx-479728cb0c752a121e0fd84c6c6d74e93e086905.tar.gz u-boot-imx-479728cb0c752a121e0fd84c6c6d74e93e086905.tar.bz2 |
dm: core: Add functions to find parent and OF data
Add dev_get_parent() as a convenience to obtain the parent of a device.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/device.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h index 287504c..13598a1 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -208,6 +208,14 @@ void *dev_get_parentdata(struct udevice *dev); void *dev_get_priv(struct udevice *dev); /** + * struct dev_get_parent() - Get the parent of a device + * + * @child: Child to check + * @return parent of child, or NULL if this is the root device + */ +struct udevice *dev_get_parent(struct udevice *child); + +/** * dev_get_of_data() - get the device tree data used to bind a device * * When a device is bound using a device tree node, it matches a |