summaryrefslogtreecommitdiff
path: root/include/dm/test.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-07-23 06:55:21 -0600
committerSimon Glass <sjg@chromium.org>2014-07-23 14:08:37 +0100
commita327dee0f40bcdebaba1a3e47f2b9f1ceb970d2a (patch)
tree20ba09ee61b51416bc86808abf7315fe6266e1ed /include/dm/test.h
parente59f458de6999b8a786da857e653db6777f675ca (diff)
downloadu-boot-imx-a327dee0f40bcdebaba1a3e47f2b9f1ceb970d2a.zip
u-boot-imx-a327dee0f40bcdebaba1a3e47f2b9f1ceb970d2a.tar.gz
u-boot-imx-a327dee0f40bcdebaba1a3e47f2b9f1ceb970d2a.tar.bz2
dm: Add child_pre_probe() and child_post_remove() methods
Some devices (particularly bus devices) must track their children, knowing when a new child is added so that it can be set up for communication on the bus. Add a child_pre_probe() method to provide this feature, and a corresponding child_post_remove() method. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm/test.h')
-rw-r--r--include/dm/test.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm/test.h b/include/dm/test.h
index 7b04850..235d728 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -86,9 +86,11 @@ struct dm_test_uclass_priv {
* struct dm_test_parent_data - parent's information on each child
*
* @sum: Test value used to check parent data works correctly
+ * @flag: Used to track calling of parent operations
*/
struct dm_test_parent_data {
int sum;
+ int flag;
};
/*
@@ -109,6 +111,7 @@ extern struct dm_test_state global_test_state;
* @fail_count: Number of tests that failed
* @force_fail_alloc: Force all memory allocs to fail
* @skip_post_probe: Skip uclass post-probe processing
+ * @removed: Used to keep track of a device that was removed
*/
struct dm_test_state {
struct udevice *root;
@@ -116,6 +119,7 @@ struct dm_test_state {
int fail_count;
int force_fail_alloc;
int skip_post_probe;
+ struct udevice *removed;
};
/* Test flags for each test */