1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-17 16:02:33 +02:00

dm: blk: Add a function to return the device type

Use the uclass name to get the device type for a block device.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-04-24 23:31:03 -06:00
committed by Tom Rini
parent 026e2136f8
commit 87571b7f20
2 changed files with 15 additions and 0 deletions

View File

@@ -433,6 +433,14 @@ int blk_select_hwpart(struct udevice *dev, int hwpart);
*/
int blk_get_from_parent(struct udevice *parent, struct udevice **devp);
/**
* blk_get_devtype() - Get the device type of a block device
*
* @dev: Block device to check
* Return: device tree, i.e. the uclass name of its parent, e.g. "mmc"
*/
const char *blk_get_devtype(struct udevice *dev);
/**
* blk_get_by_device() - Get the block device descriptor for the given device
* @dev: Instance of a storage device