summaryrefslogtreecommitdiff
path: root/drivers/core/device.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 15:27:10 (GMT)
committerSimon Glass <sjg@chromium.org>2015-01-30 00:09:56 (GMT)
commit83c7e434c9dd3ca81f8b763e23c1881b973bcf2f (patch)
treec0fc096ee51bbcd66ccabd77826e236f49329845 /drivers/core/device.c
parent1603bf3cc189da65362b83b85831e094a2fe8516 (diff)
downloadu-boot-fsl-qoriq-83c7e434c9dd3ca81f8b763e23c1881b973bcf2f.tar.xz
dm: core: Allow uclass to set up a device's child before it is probed
Some buses need to set up their devices before they can be used. This setup may well be common to all buses in a particular uclass. Support a common pre-probe method for the uclass, called before any bus devices are probed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r--drivers/core/device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 78bc460..b73d3b8 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -227,6 +227,10 @@ int device_probe_child(struct udevice *dev, void *parent_priv)
}
dev->seq = seq;
+ ret = uclass_pre_probe_child(dev);
+ if (ret)
+ goto fail;
+
if (dev->parent && dev->parent->driver->child_pre_probe) {
ret = dev->parent->driver->child_pre_probe(dev);
if (ret)