mirror of
https://xff.cz/git/u-boot/
synced 2025-09-04 02:02:08 +02:00
uclass: Add dev_get_uclass_index() to get the uclass/index of a device
This function is the reciprocal of uclass_find_device(). It will be used to print the index information in dm tree dump. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
This commit is contained in:
committed by
Marek Vasut
parent
c3211708cf
commit
e7c865620e
@@ -23,6 +23,17 @@
|
||||
*/
|
||||
int uclass_get_device_tail(struct udevice *dev, int ret, struct udevice **devp);
|
||||
|
||||
/**
|
||||
* dev_get_uclass_index() - Get uclass and index of device
|
||||
* @dev: - in - Device that we want the uclass/index of
|
||||
* @ucp: - out - A pointer to the uclass the device belongs to
|
||||
*
|
||||
* The device is not prepared for use - this is an internal function.
|
||||
*
|
||||
* @return the index of the device in the uclass list or -ENODEV if not found.
|
||||
*/
|
||||
int dev_get_uclass_index(struct udevice *dev, struct uclass **ucp);
|
||||
|
||||
/**
|
||||
* uclass_find_device() - Return n-th child of uclass
|
||||
* @id: Id number of the uclass
|
||||
|
Reference in New Issue
Block a user