summaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-10-13 23:41:50 -0600
committerSimon Glass <sjg@chromium.org>2014-10-22 10:36:46 -0600
commitaccd4b19b39bde7398aa8d1a8eeb66f3a14dde5b (patch)
tree09bcc8e1c9ebd5b6213bdb198b35691f8902e57a /include/dm/device.h
parenta8981d4f80b010666ad754d20a4f389f94d6726d (diff)
downloadu-boot-imx-accd4b19b39bde7398aa8d1a8eeb66f3a14dde5b.zip
u-boot-imx-accd4b19b39bde7398aa8d1a8eeb66f3a14dde5b.tar.gz
u-boot-imx-accd4b19b39bde7398aa8d1a8eeb66f3a14dde5b.tar.bz2
dm: core: Allow parents to pass data to children during probe
Buses sometimes want to pass data to their children when they are probed. For example, a SPI bus may want to tell the slave device about the chip select it is connected to. Add a new function to permit the parent data to be supplied to the child. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 160cd58..56862d3 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -139,6 +139,10 @@ struct udevice_id {
* @per_child_auto_alloc_size: Each device can hold private data owned by
* its parent. If required this will be automatically allocated if this
* value is non-zero.
+ * TODO(sjg@chromium.org): I'm considering dropping this, and just having
+ * device_probe_child() pass it in. So far the use case for allocating it
+ * is SPI, but I found that unsatisfactory. Since it is here I will leave it
+ * until things are clearer.
* @ops: Driver-specific operations. This is typically a list of function
* pointers defined by the driver, to implement driver functions required by
* the uclass.