Re: [PATCH v2 1/1] gpiolib: of: add gpio-line node support
From: James Hilliard
Date: Mon Feb 16 2026 - 16:20:35 EST
On Mon, Feb 16, 2026 at 4:38 AM Bartosz Golaszewski <brgl@xxxxxxxxxx> wrote:
>
> On Sat, 14 Feb 2026 22:32:37 +0100, James Hilliard
> <james.hilliard1@xxxxxxxxx> said:
> > Allow GPIO controller child nodes marked with "gpio-line" to
> > configure direction/flags at probe time without hogging the line.
> >
> > Teach OF gpiochip scanning and OF dynamic reconfiguration handlers to
> > process gpio-line nodes in addition to gpio-hog nodes.
> >
> > Also parse "gpio-line-name" and apply it to desc->name. For gpio-hog
> > nodes, keep "line-name" semantics as the hog consumer label.
> >
>
> One important thing that's missing from this commit description is: what is
> the use-case and why do you need this.
Added some more use-case details in v3:
https://lore.kernel.org/all/20260216211021.3019827-1-james.hilliard1@xxxxxxxxx/
In my case I'm setting up the GPIO line initial state and names for
userspace consumers mostly. I want to be able to configure the
individual line names from a combination of the dts file and multiple
dtso files for the same gpiochip along with setting up an initial state
before userspace consumers operate on the lines.
> The DT binding patch should be sent together with this in a single series. It
> should also be documented in the relevant .rst file.
Which file would that be?
I had previously added docs to gpio.txt but was told here to just
drop the docs:
https://lore.kernel.org/all/b851bfd4-3c35-489f-a32d-dcd7a37ca99a@xxxxxxxxxx/
> I suppose it's another shot at defining what we previously called
> "initial-line-state", "default-line-state", etc. What happens when someone
> requests the line, reconfigures it and then releases it?
This should just provide an initial configuration, subsequent consumers
would override whatever is set here AFAIU.
> This should also not be OF-specific but rather a GPIOLIB-wide switch.
Like this?:
https://lore.kernel.org/all/20260216211021.3019827-1-james.hilliard1@xxxxxxxxx/
>
> Bartosz