On Tue, Feb 4, 2020 at 8:20 AM Simon Glass <s...@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 <s...@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...@gmail.com>