From 50162348f0d3b915004733131acd81805e202c76 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Feb 2020 09:54:50 -0700 Subject: dm: core: Add a function to find a device by drvdata 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 Reviewed-by: Bin Meng --- include/dm/test.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/dm/test.h') diff --git a/include/dm/test.h b/include/dm/test.h index 07385cd531..f0f36624ce 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -56,6 +56,8 @@ enum { enum { DM_TEST_TYPE_FIRST = 0, DM_TEST_TYPE_SECOND, + + DM_TEST_TYPE_COUNT, }; /* The number added to the ping total on each probe */ -- cgit v1.2.3