Re: [PATCH v4 05/29] dt-bindings: bus: Add simple-platform-bus
From: Herve Codina
Date: Fri Oct 31 2025 - 10:29:53 EST
On Fri, 31 Oct 2025 09:52:16 +0100
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> Hi Hervé,
>
> On Wed, 15 Oct 2025 at 09:17, Herve Codina <herve.codina@xxxxxxxxxxx> wrote:
> > A Simple Platform Bus is a transparent bus that doesn't need a specific
> > driver to perform operations at bus level.
> >
> > Similar to simple-bus, a Simple Platform Bus allows to automatically
> > instantiate devices connected to this bus.
> >
> > Those devices are instantiated only by the Simple Platform Bus probe
> > function itself.
> >
> > Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>
>
> Thanks for your patch!
>
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/bus/simple-platform-bus.yaml
> > @@ -0,0 +1,50 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/bus/simple-platform-bus.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Simple Platform Bus
> > +
> > +maintainers:
> > + - Herve Codina <herve.codina@xxxxxxxxxxx>
> > +
> > +description: |
> > + A Simple Platform Bus is a transparent bus that doesn't need a specific
> > + driver to perform operations at bus level.
> > +
> > + Similar to simple-bus, a Simple Platform Bus allows to automatically
> > + instantiate devices connected to this bus. Those devices are instantiated
> > + only by the Simple Platform Bus probe function itself.
>
> So what are the differences with simple-bus? That its children are
> instantiated "only by the Simple Platform Bus probe function itself"?
> If that is the case, in which other places are simple-bus children
> instantiated?
In of_platform_populate(). It call of_platform_bus_create() which is
recursive:
https://elixir.bootlin.com/linux/v6.14/source/drivers/of/platform.c#L374
So children are instantiated out of the bus probe().
>
> Do we need properties related to power-management (clocks, power-domains),
> or will we need a "simple-pm-platform-bus" later? ;-)
>
> FTR, I still think we wouldn't have needed the distinction between
> "simple-bus" and "simple-pm-bus"...
I would like that. Using simple-pm-bus solves my issue but I don't have any
clocks or power-domains to set. The simple-pm-bus bus requires at least
one of them. Even if the driver itself solved my issue, I cannot be
compliant with its binding.
Best regards,
Hervé