Re: [PATCH v3 3/7] gpio: regmap: Add gpio_regmap_operation and write-enable support
From: Linus Walleij
Date: Wed May 13 2026 - 03:40:30 EST
Hi Yu-Chun,
thanks for your patch! I really like the direction this is taking.
On Tue, May 12, 2026 at 5:33 AM Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx> wrote:
> Extend the reg_mask_xlate callback with an operation type parameter
> (gpio_regmap_operation) to allow drivers to return different
> register/mask combinations for different GPIO operations.
>
> Also add write-enable mechanism for hardware that requires setting a
> write-enable bit before modifying GPIO control registers.
>
> Consequently, update all existing drivers utilizing the gpio-regmap
> framework (across drivers/gpio, drivers/iio, and drivers/pinctrl)
> to accommodate the new reg_mask_xlate function signature.
>
> Suggested-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
linusw@xxxxxxxxxx these days.
> Signed-off-by: Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx>
The rest of the comments I had Andy, Jonathan and Sashiko has
already pointed out, just hash through it and this will look really
nice in the end.
Yours,
Linus Walleij