Re: [PATCH v2 1/2] gpio: regmap: Support sparsed fixed direction

From: Linus Walleij

Date: Mon May 11 2026 - 15:01:19 EST


On Mon, May 11, 2026 at 9:18 AM Michael Walle <mwalle@xxxxxxxxxx> wrote:
> On Fri May 8, 2026 at 2:51 PM CEST, Linus Walleij wrote:

> > On some regmapped GPIOs apparently only a sparser selection
> > of the lines (not all) are actually fixed direction.
> >
> > Support this situation by adding an optional bitmap indicating
> > which GPIOs are actually fixed direction and which are not.
>
> Thanks, this patch looks good. But could we invert the logic and use
> fixed_direction_mask as that feels more natural to me?

Sure!

> And for legacy reasons, so we don't have to change the drivers:

I don't think any drivers would need changing, the idea was that
if the new *sparse bitmap is NULL (as in the old drivers) all lines are
assumed to be fixed direction.

But I think your idea is maybe more intuitive so let's try that.

Yours,
Linus Walleij