Re: [PATCH v3] gpiolib: fix hogs with multiple lines

From: Geert Uytterhoeven

Date: Mon Mar 30 2026 - 08:56:20 EST


On Mon, 30 Mar 2026 at 10:36, Bartosz Golaszewski
<bartosz.golaszewski@xxxxxxxxxxxxxxxx> wrote:
> After moving GPIO hog handling into GPIOLIB core, we accidentally stopped
> supporting devicetree hog definitions with multiple lines like so:
>
> hog {
> gpio-hog;
> gpios = <3 0>, <4 GPIO_ACTIVE_LOW>;
> output-high;
> line-name = "foo";
> };
>
> Restore this functionality to fix reported regressions.
>
> Fixes: d1d564ec4992 ("gpio: move hogs into GPIO core")
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/all/CAMuHMdX6RuZXAozrF5m625ZepJTVVr4pcyKczSk12MedWvoejw@xxxxxxxxxxxxxx/
> Tested-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
> ---
> Changes in v3:
> - Fix types for some variables
> - Make the return value check for "#gpio-cells" property stricter
> - Link to v2: https://patch.msgid.link/20260326-gpio-hogs-multiple-v2-1-7c3813460e4f@xxxxxxxxxxxxxxxx

Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

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