summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:27:04 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:55 -0700
commitb367053102e597eb21b0a5e86c63e8d10f368cb0 (patch)
tree352917bf63f69dec8584a547c836548f87a07cde /include
parent0118ce79577f9b0881f99a6e4f8a79cd5014cb87 (diff)
downloadu-boot-imx-b367053102e597eb21b0a5e86c63e8d10f368cb0.zip
u-boot-imx-b367053102e597eb21b0a5e86c63e8d10f368cb0.tar.gz
u-boot-imx-b367053102e597eb21b0a5e86c63e8d10f368cb0.tar.bz2
dm: core: Add a function to get a device's uclass ID
This is useful to check which uclass a device is in. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 50f1b4f..81afa8c 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -245,6 +245,14 @@ struct udevice *dev_get_parent(struct udevice *child);
*/
ulong dev_get_of_data(struct udevice *dev);
+/*
+ * device_get_uclass_id() - return the uclass ID of a device
+ *
+ * @dev: Device to check
+ * @return uclass ID for the device
+ */
+enum uclass_id device_get_uclass_id(struct udevice *dev);
+
/**
* device_get_child() - Get the child of a device by index
*