Re: [PATCH net-next 09/12] gpio: tc956x: add TC956x/QPS615 support
From: Alex Elder
Date: Thu May 07 2026 - 14:39:45 EST
On 5/2/26 9:48 PM, Andrew Lunn wrote:
It's possible gpio-regmap.c *could* be used. We started with
vendor code and this code got separated at some point along
the way. It was working, and I don't think I pursued other
options at that point. I'll look at this possibility before we
send out the next version.
The GPIO subsystem has made a big effort to provide generic code,
since GPIOs are pretty simple things with a lot in common. So if the
generic code works, or can be made to work with minor changes, you
should use it.
Yes, I can confirm this is what I will use. As mentioned
elsewhere, LinusW provided a patch that support the one
unusual thing this does (input-only GPIO lines).
What do you mean instantiate it twice?
I _think_ you need one instance for the first 32 GPIOs, and a second
one for the remaining GPIOs. But maybe config->reg_stride might allow
it to work with a single instance?
Oh I see. Looking at it now, I presume the reg_stride will work here.
Thanks.
-Alex
Andrew