1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-22 10:31:56 +02:00

dm: core: Add a function to get a uclass name

It is useful in debug() statements to display the name of the uclass for a
device. Add a simple function to provide this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Simon Glass
2016-10-05 20:42:13 -06:00
committed by Bin Meng
parent 5023bd7a80
commit 0a5f6f869f
2 changed files with 17 additions and 0 deletions

View File

@@ -118,6 +118,14 @@ struct uclass_driver {
*/
int uclass_get(enum uclass_id key, struct uclass **ucp);
/**
* uclass_get_name() - Get the name of a uclass driver
*
* @id: ID to look up
* @returns the name of the uclass driver for that ID, or NULL if none
*/
const char *uclass_get_name(enum uclass_id id);
/**
* uclass_get_device() - Get a uclass device based on an ID and index
*