[PATCH v2 02/17] dm: core: Add a function to find a device by drvdata

Bin Meng bmeng.cn at gmail.com
Tue Feb 4 08:31:59 CET 2020


On Tue, Feb 4, 2020 at 8:20 AM Simon Glass <sjg at chromium.org> wrote:
>
> It is sometimes useful to find a device in a uclass using only its driver
> data. The driver data often indicates the 'subtype' of the device, e,g,
> via its compatible string.
>
> Add a function to handle this.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2:
> - Add new patch to find a device by drvdata
>
>  drivers/core/uclass.c | 17 +++++++++++++++++
>  include/dm/test.h     |  2 ++
>  include/dm/uclass.h   | 14 ++++++++++++++
>  test/dm/test-fdt.c    | 21 +++++++++++++++++++++
>  4 files changed, 54 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list