Re: [PATCH RFC 1/2] of: property: fw_devlink: Follow GPIO nexus maps
From: Linus Walleij
Date: Wed Sep 16 2026 - 13:12:48 EST
On Wed, Sep 2, 2026 at 1:42 PM Ernest Van Hoecke
<ernestvanhoecke@xxxxxxxxx> wrote:
> From: Ernest Van Hoecke <ernest.vanhoecke@xxxxxxxxxxx>
>
> GPIO consumers use of_parse_phandle_with_args_map() to resolve specifiers
> through gpio-map properties. fw_devlink instead parses GPIO properties as
> direct phandle references, so it records the nexus node as the supplier
> rather than the mapped GPIO provider.
>
> A nexus is a translation node, not the GPIO provider, and need not be
> populated as a device. The resulting fwnode link can therefore remain
> unresolved and indefinitely defer the consumer while
> device_links_check_suppliers() waits for the nexus.
>
> Use the map-aware parser for all supported GPIO property spellings. This
> makes fw_devlink resolve the same provider as the GPIO consumer API. Direct
> GPIO references continue to work because the map-aware parser returns the
> original provider when no gpio-map property is present.
>
> Add OF unittest coverage for mapped and direct GPIO suppliers, including
> the deprecated singular and unprefixed property spellings.
>
> Fixes: 7f00be96f125 ("of: property: Add device link support for interrupt-parent, dmas and -gpio(s)")
> Reported-by: Leonardo Costa <leonardo.costa@xxxxxxxxxxx>
> Link: https://lore.kernel.org/all/juuc4af7ndbajcl7gzf4tg5qz2q2j5tt3rvql4jbauradujrre@gc5nbdhhixaf/
> Tested-by: Leonardo Costa <leonardo.costa@xxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@xxxxxxxxxxx>
I feel it needs a compulsory review by Rob, but AFAICT this is
in line with the Nexus ideas.
Acked-by: Linus Walleij <linusw@xxxxxxxxxx>
Yours,
Linus Walleij