summaryrefslogtreecommitdiffstats
path: root/include/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:27:08 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:56 -0700
commit081f2fcbd9a95ba10677065359791f8fea3f8c58 (patch)
treeed8312d3d54e07e659a64f5b59657a147317130f /include/dm
parent19a25f672c6aa1a9a9b94c0ffbfda3e8246d1a19 (diff)
downloadtalos-obmc-uboot-081f2fcbd9a95ba10677065359791f8fea3f8c58.tar.gz
talos-obmc-uboot-081f2fcbd9a95ba10677065359791f8fea3f8c58.zip
dm: core: Allow the uclass to set up a device's child after binding
For buses, after a child is bound, allow the uclass to perform some processing. This can be used to figure out the address of the child (e.g. the chip select for SPI slaves) so that it is ready to be probed. This avoids bus drivers having to repeat the same process, which really should be done by the uclass, since it is common. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/uclass.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index ac6c85072c..5c5b8f4208 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -55,6 +55,7 @@ struct udevice;
* @pre_unbind: Called before a device is unbound from this uclass
* @post_probe: Called after a new device is probed
* @pre_remove: Called before a device is removed
+ * @child_post_bind: Called after a child is bound to a device in this uclass
* @init: Called to set up the uclass
* @destroy: Called to destroy the uclass
* @priv_auto_alloc_size: If non-zero this is the size of the private data
@@ -81,6 +82,7 @@ struct uclass_driver {
int (*pre_unbind)(struct udevice *dev);
int (*post_probe)(struct udevice *dev);
int (*pre_remove)(struct udevice *dev);
+ int (*child_post_bind)(struct udevice *dev);
int (*init)(struct uclass *class);
int (*destroy)(struct uclass *class);
int priv_auto_alloc_size;
OpenPOWER on IntegriCloud