Hi Simon, On Thu, Sep 27, 2018 at 9:42 PM Simon Glass <s...@chromium.org> wrote: > > Hi Bin, > > On 23 September 2018 at 06:41, Bin Meng <bmeng...@gmail.com> wrote: > > Some buses need to set up their child devices after they are probed. > > Support a common child_post_probe() method for the uclass. > > > > With this change, the two APIs uclass_pre_probe_device() and > > uclass_post_probe_device() become symmetric. > > > > Signed-off-by: Bin Meng <bmeng...@gmail.com> > > --- > > > > drivers/core/uclass.c | 13 ++++++++++++- > > include/dm/uclass.h | 4 +++- > > 2 files changed, 15 insertions(+), 2 deletions(-) > > Another option, perhaps not quite as elegant, is for the driver to > call into the uclass in its probe() method. We need to balance > elegance with the cost of adding a new field to the uclass which is > rarely used. What do you think? >
Yes, we can use driver's probe() method to achieve the same goal, but that seems a little bit duplicated effort for every driver. Also I believe we should make uclass_pre_probe_device() and uclass_post_probe_device() symmetric. > Also, this does need some sort of use in sandbox, so can you update > the test driver to use it? > Yes, will add in v2. Regards, Bin _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot