dm: Introduce per-child data for devices

Some device types can have child devices and want to store information
about them. For example a USB flash stick attached to a USB host
controller would likely use this space. The controller can hold
information about the USB state of each of its children.

The data is stored attached to the child device in the 'parent_priv'
member. It can be auto-allocated by dm when the child is probed. To
do this, add a per_child_auto_alloc_size value to the parent driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/dm/test.h b/include/dm/test.h
index e8e1c0b..7b04850 100644
--- a/include/dm/test.h
+++ b/include/dm/test.h
@@ -82,6 +82,15 @@
 	int total_add;
 };
 
+/**
+ * struct dm_test_parent_data - parent's information on each child
+ *
+ * @sum: Test value used to check parent data works correctly
+ */
+struct dm_test_parent_data {
+	int sum;
+};
+
 /*
  * Operation counts for the test driver, used to check that each method is
  * called correctly