Re: [PATCH 0/6] gpiolib: unify gpio-hog code

From: Andy Shevchenko

Date: Fri Mar 06 2026 - 07:00:52 EST


On Thu, Mar 05, 2026 at 10:51:25AM +0100, Bartosz Golaszewski wrote:
> GPIO hogs are handled separately in three places: for OF, ACPI and
> machine lookup. In addition hogs cannot be set up using software nodes.
> A lot of that code is actually redundant and - except for some special
> handling of OF nodes - can be unified in one place.
>
> This series moves hogging into GPIO core and bases it on fwnode API
> (with a single helper from OF to translate devicetree properties into
> lookup flags), converts the two remaining users of machine hogs to using
> software node approach and removes machine hog support entirely. In
> addition, there's a patch extending the configurability of gpio-sim now
> that it uses software nodes for hogs.
>
> For merging: I think this should go through the GPIO tree with an Ack
> from OMAP1 maintainers.
>
> Even with the new feature for gpio-sim, this series still removes twice
> the number of lines, it adds.

Lovely! This was in my TODO list somewhere deep, but I never started it for
real (had some very very initial patches)

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
(Maybe I will have time to test it later on, I need to check if there is a use
of them on Intel Galileo Gen1 platform).

--
With Best Regards,
Andy Shevchenko