[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22a84772-0e54-4b99-9bc7-59e7e4633807@gmail.com>
Date: Thu, 16 Oct 2025 17:37:20 +0200
From: Jonas Jelonek <jelonek.jonas@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>, Peter Rosin <peda@...ntia.se>,
Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 2/2] gpio: add gpio-split driver
Hi Linus,
On 14.10.25 10:37, Linus Walleij wrote:
> This can be made easier these days, reusing the
> forwarder library. I think! Check if I'm right.
I think this doesn't really simplify things her. As far as I can see the
GPIO forwarder is more targeted toward 1-to-1 scenarios, requiring some
(or even more?) "hackery" to fit to my 1-to-many.
> This part is maybe the most interesting:
>
> fwd = devm_gpiochip_fwd_alloc(dev, pctrl->pctrl_data->ngpio);
>
> Here ngpio will be 1 for your usecase.
Giving ngpio=1 here makes the gpiochip only provide a single gpio. This then
needs to be the number of GPIOs defined in the DT (number of child nodes).
But in this case, the internal 'descs' is allocated accordingly and there's a
1-to-1-mapping between the external offset and internal offset. To solve this
I would have to add the same descriptor for the shared gpio multiple times.
Not sure if this is a good idea.
>> +++ b/drivers/gpio/gpio-split.c
> As mentioned I would call this gpio-line-mux.c
Sure, will be changed.
> Yours,
> Linus Walleij
Best,
Jonas
Powered by blists - more mailing lists