Re: [PATCH net-next 09/12] gpio: tc956x: add TC956x/QPS615 support

From: Andrew Lunn

Date: Sat May 02 2026 - 22:50:06 EST


> 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.

> 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?

Andrew