aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPrzemyslaw Marczak2015-04-15 13:07:25 +0200
committerSimon Glass2015-04-22 11:03:15 -0600
commitf9c370dcdf056f035f18bf77db8a706cea21f9ce (patch)
tree624132a7fed152a22b665157f925450487cd636c /include
parentcc73d37b7f1edbbf03e2abcf5815bdd122e8baed (diff)
dm: core: device: add function: dev_get_uclass_name()
This commit extends the driver model device's API by function: - dev_get_uclass_name() And this function returns the device's uclass driver name if: - given dev pointer, is non_NULL otherwise, the NULL pointer is returned. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 049cb2f5e2d..18296bb6861 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -299,6 +299,16 @@ const void *dev_get_driver_ops(struct udevice *dev);
*/
enum uclass_id device_get_uclass_id(struct udevice *dev);
+/*
+ * dev_get_uclass_name() - return the uclass name of a device
+ *
+ * This checks that dev is not NULL.
+ *
+ * @dev: Device to check
+ * @return pointer to the uclass name for the device
+ */
+const char *dev_get_uclass_name(struct udevice *dev);
+
/**
* device_get_child() - Get the child of a device by index
*