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>
This commit is contained in:
Simon Glass 2015-01-25 08:27:10 -07:00
parent 1603bf3cc1
commit 83c7e434c9
7 changed files with 85 additions and 0 deletions

View file

@ -43,6 +43,17 @@ int uclass_bind_device(struct udevice *dev);
*/
int uclass_unbind_device(struct udevice *dev);
/**
* uclass_pre_probe_child() - Deal with a child that is about to be probed
*
* Perform any pre-processing that is needed by the uclass before it can be
* probed.
*
* @dev: Pointer to the device
* #return 0 on success, -ve on error
*/
int uclass_pre_probe_child(struct udevice *dev);
/**
* uclass_post_probe_device() - Deal with a device that has just been probed
*