[U-Boot] [PATCH V4 07/10] dm: core: uclass: add function: uclass_get_device_by_name()
Simon Glass
sjg at chromium.org
Sun Apr 19 15:23:49 CEST 2015
On 15 April 2015 at 05:07, Przemyslaw Marczak <p.marczak at samsung.com> wrote:
> This commit extends the driver model uclass's API by function:
> - uclass_get_device_by_name()
>
> And this function returns the device if:
> - uclass with given ID, exists,
> - device with exactly given name(dev->name), exists,
> - device probe, doesn't return an error.
>
> The returned device is activated and ready to use.
>
> Note:
> This function returns the first device, which name is equal
> to the given one. This means, that using this function you must
> assume, that the device name is unique in the given uclass's ID
> device list.
>
> Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> Changes V4:
> - new commit
> ---
> drivers/core/uclass.c | 11 +++++++++++
> include/dm/uclass.h | 15 +++++++++++++++
> 2 files changed, 26 insertions(+)
Acked-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list