[U-Boot] [PATCH] dm: Add a No-op uclass

Simon Glass sjg at chromium.org
Mon Apr 1 16:18:47 UTC 2019


Hi Jean-Jacques,

On Mon, 1 Apr 2019 at 05:32, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
>
> Hi Simon,
>
> On 30/03/2019 22:18, Simon Glass wrote:
> > Hi Jean-Jacques,
> >
> > On Fri, 22 Mar 2019 at 10:44, Jean-Jacques Hiblot <jjhiblot at ti.com> wrote:
> >> This uclass is intended for devices that do not need any features from the
> >> uclass, including binding children.
> >> This will typically be used by devices that are used to bind child devices
> >> but do not use dm_scan_fdt_dev() to do it.
> >>
> > Can you expand this motivation a little? I am not sure why calling
> > dm_scan_fdt_dev() would be problematic.
>
> In the case of the USB wrappers, there are 2 children nodes: one for
> peripheral and one for host. The wrapper binds only one of them.
> dm_scan_fdt_dev() would bind both.

OK, please add this to the commit message and your uclass header file
(or wherever else you can add docs for this uclass).

>
> >
> > Also if you do add a new uclass it should have a sandbox driver and test.
>
> There isn't much to test, except to check that the uclass is present.
> The UCLASS itself does not provide any feature.

Well, one feature is that it does not scan its children. So you could
add a child node in test.dts and test that it does not get bound.

Regards,
Simon


More information about the U-Boot mailing list