summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dm/device.h6
-rw-r--r--include/dm/test.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 20207ce..c8a4072 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -118,6 +118,10 @@ struct udevice_id {
* @remove: Called to remove a device, i.e. de-activate it
* @unbind: Called to unbind a device from its driver
* @ofdata_to_platdata: Called before probe to decode device tree data
+ * @child_pre_probe: Called before a child device is probed. The device has
+ * memory allocated but it has not yet been probed.
+ * @child_post_remove: Called after a child device is removed. The device
+ * has memory allocated but its device_remove() method has been called.
* @priv_auto_alloc_size: If non-zero this is the size of the private data
* to be allocated in the device's ->priv pointer. If zero, then the driver
* is responsible for allocating any data required.
@@ -143,6 +147,8 @@ struct driver {
int (*remove)(struct udevice *dev);
int (*unbind)(struct udevice *dev);
int (*ofdata_to_platdata)(struct udevice *dev);
+ int (*child_pre_probe)(struct udevice *dev);
+ int (*child_post_remove)(struct udevice *dev);
int priv_auto_alloc_size;
int platdata_auto_alloc_size;
int per_child_auto_alloc_size;
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 */