mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
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>
This commit is contained in:
parent
0118ce7957
commit
b367053102
3 changed files with 24 additions and 0 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue