Re: [PATCH v2 2/2] gpio: aggregator: add gpio-aggregator DT compatible

From: Krzysztof Kozlowski

Date: Fri Feb 13 2026 - 03:50:11 EST


On 13/02/2026 09:29, Herve Codina wrote:
> Hi all,
>
> On Fri, 13 Feb 2026 08:31:21 +0100
> Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:
>
>>>
>>> Or is the issue just with the name of the compatible I used being
>>> called "gpio-aggregator"?
>>
>> No, the issue is that there is no hardware you are trying represent in DTS.
>
> Except if you have a piece of hardware that invert the gpio line.
>
> In that case you need to set GPIO_ACTIVE_LOW somewhere.
>
> The aggregator allows to describe this line inverter.

Of course. And then you could touch that piece of hardware and use it as
an argument here, where I asked show me the piece of hardware being
described.

Anyway, we encode the inverters in the final GPIO flags.

>
> Of course, if the gpio is connected to a hardware component handled by the
> kernel, the DT node describing this hardware can set the flag.
>
> The issue is for GPIOs that are just GPIOs and should by a user-space
> application as GPIOs.
>
> Some bindings exist for GPIO and do not describe the hardware but the
> feature. For instance:
> https://elixir.bootlin.com/linux/v6.18/source/Documentation/devicetree/bindings/trigger-source/gpio-trigger.yaml
> https://elixir.bootlin.com/linux/v6.18/source/Documentation/devicetree/bindings/power/reset/gpio-poweroff.yaml
> https://elixir.bootlin.com/linux/v6.18/source/Documentation/devicetree/bindings/power/reset/gpio-restart.yaml
>
> Can we consider the gpio-aggregator describing the wires that should be
> grouped together.

No, because the grouping depends on user-space choice (as explained by
the author).

>
> Industrial board can have some GPIOs grouped together and used as inputs or
> ouputs of this industrial board.
>
> As output they command an external system. As input, they get feedback from
> this system.
>
> gpio-aggregator describes those lines.
>
> In that sense, it describes hardware.
> Maybe the "gpio-aggregator" name doesn't reflect that and a compatible such as
> "gpio-equipment" could make sense.

What is a "GPIO grouped together"? The moment such grouping does not
depend on hardware characteristics, it's the moment it is purely
arbitrary choice thus not suitable for DT.

Comparison to gpio-restart where you have actual component, receiving a
fixed line and then doing restart is not appropriate.


Best regards,
Krzysztof