Re: [PATCH v2 1/2] dt-bindings: gpio: add gpio-aggregator binding

From: Geert Uytterhoeven

Date: Wed Feb 11 2026 - 05:02:13 EST


Hi Hervé,

On Wed, 11 Feb 2026 at 10:57, Herve Codina <herve.codina@xxxxxxxxxxx> wrote:
> On Wed, 11 Feb 2026 10:47:53 +0100
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > On Wed, 11 Feb 2026 at 09:35, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:
> > > On Wed, Feb 11, 2026 at 1:26 AM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> > > > On Wed, 11 Feb 2026 at 09:14, James Hilliard <james.hilliard1@xxxxxxxxx> wrote:
> > > > > Document the gpio-aggregator virtual GPIO controller with a dedicated
> > > > > schema and compatible string.
> > > > >
> > > > > Also extend the GPIO AGGREGATOR MAINTAINERS entry to cover the new
> > > > > binding file.
> > > > >
> > > > > Signed-off-by: James Hilliard <james.hilliard1@xxxxxxxxx>
> > > >
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/gpio/gpio-aggregator.yaml
> > > > > @@ -0,0 +1,54 @@
> > > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > > +%YAML 1.2
> > > > > +---
> > > > > +$id: http://devicetree.org/schemas/gpio/gpio-aggregator.yaml#
> > > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > > +
> > > > > +title: GPIO aggregator controller
> > > > > +
> > > > > +maintainers:
> > > > > + - Alexander Stein <linux@xxxxxxxxxxxxxxx>
> > > > > +
> > > > > +description:
> > > > > + GPIO aggregator forwards selected GPIO lines from one or more GPIO
> > > > > + controllers and exposes them as a virtual GPIO controller.
> > > >
> > > > > +examples:
> > > > > + - |
> > > > > + #include <dt-bindings/gpio/gpio.h>
> > > > > +
> > > > > + gpio_agg: gpio-aggregator {
> > > > > + compatible = "gpio-aggregator";
> > > > > + #gpio-cells = <2>;
> > > > > + gpio-controller;
> > > > > + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>,
> > > > > + <&gpio3 1 GPIO_ACTIVE_HIGH>;
> > > > > + gpio-line-names = "modem-reset", "modem-enable";
> > > > > + };
> > > >
> > > > Looking at the example, it seems you intend to use the gpio-aggregator
> > > > as a "Generic GPIO Driver", like in the example in the documentation[1].
> > > > Hence I think you should not introduce and abuse the "gpio-aggregator"
> > > > compatible value for this, but instead:
> > > > 1. Use a proper compatible value that matches your device,
> > > > 2. Write proper DT bindings for the device,
> > > > 3. Add the proper device's compatible value to the gpio-aggregator
> > > > driver's match table.
> > > > The above is very similar to how spidev is handled, which also forbids
> > > > using the spidev compatible value in DTS.
> > >
> > > Isn't this gpio-aggregator driver supposed to be non-hardware
> > > specific?
> > >
> > > I'm trying to use it as described here, I noticed the compatible
> > > in the blog post was missing and just needed adding to the
> > > driver: https://bootlin.com/blog/gpio-aggregator-a-virtual-gpio-chip/
> >
> > Let's kick Hervé to fix that ;-)
>
> Where is it missing ?

In the driver ;-)

DTS must never use 'compatible = "gpio-aggregator"'.
Instead, you must use a suitable compatible value, as described in [1]:

"Binding a device to the GPIO Aggregator is performed either
by modifying the gpio-aggregator driver, or by writing to the
“driver_override” file in Sysfs."

> In the DTS snippet example I see:
> --- 8< ---
> gpio-aggregator {
> pinctrl-names = "default";
> pinctrl-0 = <&gpio_pins>;
> compatible = "gpio-aggregator";
> ...
> };
> --- 8< ---

> > > > [1] https://docs.kernel.org/6.2/admin-guide/gpio/gpio-aggregator.html#generic-gpio-driver

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds