[PATCH v3 3/7] gpio: regmap: Add gpio_regmap_operation and write-enable support

Linus Walleij linusw at kernel.org
Wed May 13 00:40:02 PDT 2026


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 at realtek.com> 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 at linaro.org>

linusw at kernel.org these days.

> Signed-off-by: Yu-Chun Lin <eleanor.lin at realtek.com>

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



More information about the linux-arm-kernel mailing list