Re: [PATCH] gpio: shared: call gpio_chip::of_xlate() if set

From: Bartosz Golaszewski

Date: Tue Mar 17 2026 - 11:25:18 EST


On Tue, Mar 17, 2026 at 3:05 PM Bartosz Golaszewski <brgl@xxxxxxxxxx> wrote:
>
> On Tue, Mar 17, 2026 at 2:47 PM Jon Hunter <jonathanh@xxxxxxxxxx> wrote:
> >
> >
> > >> I am not sure if this is because these are child nodes of gpio-keys?
> > >> Obviously this is not a proper example, but something quick and dirty
> > >> for local testing :-)
> > >>
> > >
> > > Let me create a setup with GPIO keys then.
> >
> > Thanks!
> > Jon
> >
>
> I can reproduce this with a gpio-keys setup. I think you hit an
> interesting corner-case where the consumer device is the same for two
> shared pins assigned to its child fwnodes. The setup doesn't make
> sense really but I guess this shouldn't just fail like that.
>

So the problem goes like this: we're using lookup tables for shared
GPIOs but they are not capable of dealing with two fwnodes that are
children of the same device that share the same pin but are themselves
not attached to a device bound to a driver. While we could extend
lookup tables to take that into account, I think that the setup here
is so hypothetical, it doesn't really make sense to spend time on it.
Does this patch fix the real problem on the tegra board that you
reported initially? I doubt two separate GPIO keys, share the same pin
in real life.

Bart