Thread (59 messages) 59 messages, 7 authors, 2026-02-20

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

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2026-02-11 13:30:55
Also in: linux-gpio, lkml

Hi Hervé,

On Wed, 11 Feb 2026 at 11:58, Herve Codina [off-list ref] wrote:
On Wed, 11 Feb 2026 11:01:24 +0100
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Wed, 11 Feb 2026 at 10:57, Herve Codina [off-list ref] wrote:
quoted
On Wed, 11 Feb 2026 10:47:53 +0100
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Wed, 11 Feb 2026 at 09:35, James Hilliard [off-list ref] wrote:
quoted
On Wed, Feb 11, 2026 at 1:26 AM Geert Uytterhoeven [off-list ref] wrote:
quoted
On Wed, 11 Feb 2026 at 09:14, James Hilliard [off-list ref] wrote:
quoted
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 <redacted>
quoted
--- /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@ew.tq-group.com>
+
+description:
+  GPIO aggregator forwards selected GPIO lines from one or more GPIO
+  controllers and exposes them as a virtual GPIO controller.
quoted
+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"'.
Why?

gpio-aggregator can be used as a virtual device to aggregate GPIOs for
user-space.
It can be used for that, but that is not hardware description.
I think we should have 'compatible = "gpio-aggregator"' in dts.
Proper hardware description requires a proper compatible value.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help