From f9c370dcdf056f035f18bf77db8a706cea21f9ce Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Wed, 15 Apr 2015 13:07:25 +0200
Subject: 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
Cc: Simon Glass
Acked-by: Simon Glass
---
include/dm/device.h | 10 ++++++++++
1 file changed, 10 insertions(+)
(limited to 'include/dm')
diff --git a/include/dm/device.h b/include/dm/device.h
index 049cb2f..18296bb 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
*
--
cgit v1.1