From 079ac59586fa1e0c69020e74e4f16cbfdf82232d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 23 Dec 2020 08:11:18 -0700 Subject: test: Move some test drivers into their own file At present several test drivers are part of the test file itself. Some of these are useful for of-platdata tests. Separate them out so we can use them for other things also. A few adjustments are needed so this driver can build for sandbox_spl as well. Signed-off-by: Simon Glass --- include/dm/test.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/dm/test.h') diff --git a/include/dm/test.h b/include/dm/test.h index cbe1b57d95f..6ac6672cd6f 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -167,6 +167,24 @@ struct sandbox_sdl_plat { int font_size; }; +/** + * struct dm_test_parent_plat - Used to track state in bus tests + * + * @count: + * @bind_flag: Indicates that the child post-bind method was called + * @uclass_bind_flag: Also indicates that the child post-bind method was called + */ +struct dm_test_parent_plat { + int count; + int bind_flag; + int uclass_bind_flag; +}; + +enum { + TEST_FLAG_CHILD_PROBED = 10, + TEST_FLAG_CHILD_REMOVED = -7, +}; + /* Declare ping methods for the drivers */ int test_ping(struct udevice *dev, int pingval, int *pingret); int testfdt_ping(struct udevice *dev, int pingval, int *pingret); -- cgit