summaryrefslogtreecommitdiff
path: root/include/blk.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-27 11:37:17 -0600
committerJaehoon Chung <jh80.chung@samsung.com>2017-06-09 20:25:16 +0900
commit9f103b9cb5f8de4f196b5ef8f6ddb4749cd732ba (patch)
treea4f8dd89d5ec45049c7bc0c389ce59835e1bcb23 /include/blk.h
parentfc69d472621b5c7513bcb8b4e1fe58ca8f5e035a (diff)
dm: blk: Add a way to obtain a block device from its parent
Many devices support a child block device (e.g. MMC, USB). Add a convenient way to get this device given the parent device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/blk.h')
-rw-r--r--include/blk.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/blk.h b/include/blk.h
index a128ee4841..4d60987f61 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -616,4 +616,11 @@ ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start,
*/
int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart);
+/**
+ * blk_get_from_parent() - obtain a block device by looking up its parent
+ *
+ * All devices with
+ */
+int blk_get_from_parent(struct udevice *parent, struct udevice **devp);
+
#endif