Re: [PATCH v3 00/10] gpio: make gpiolib-shared more fwnode-centric

From: Linus Walleij

Date: Mon Nov 30 2026 - 16:34:38 EST


On Fri, Nov 20, 2026 at 1:46 PM Bartosz Golaszewski
<bartosz.golaszewski@xxxxxxxxxxxxxxxx> wrote:

> Currently the code in gpiolib-shared.c only supports OF nodes and uses a
> lot of OF-specific APIs. This series attempts to make the code more
> generic, ahead of extending support for sharing GPIOs to other types of
> firmware nodes, by defining two new fwnode operations, implementing them
> for OF nodes and using them in GPIOLIB in order to limit the OF-specific
> API usage to only a few places guarded by ifdefs.
>
> The new fwnode APIs are:
> a) property_get_names() - this closes the gap between OF nodes and
> fwnodes: OF nodes allow users to iterate over all properties while
> fwnodes don't advertise all properties in any way at the moment
> b) count_references() - there's currently no way of counting references
> in an fwnode reliably: using fwnode_property_get_reference_args()
> does not work for empty references (e.g.: phandle = <0>, <&foo 1 2>;)
>
> The first patch adds a CLASS() for string arrays. The following 6 define
> and implement new fwnode operations. The final patch generalizes the code
> in gpiolib-shared.c.
>
> Merging strategy: patches 1-8 should go through the driver core tree and
> be provided on an immutable branch to me so that I can pull it and queue
> the final 2 patches via the GPIO tree.
>
> This series depends on the series from Alejandro Colomar adding
> strprefix() as indicated in the b4 tracking.

Overall I like it but don't have time to do an in-depth review because
of the AI patch storm weather, but from a quick view all this
looks good, so FWIW:
Acked-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij