RE: [PATCH v6 5/8] gpio: regmap: Add gpio_regmap_operation and value_xlate support

From: Yu-Chun Lin [林祐君]

Date: Sat Jul 25 2026 - 08:49:10 EST


> On Tue, 21 Jul 2026 14:57:59 +0800
> Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx> wrote:
>
> > Extend the reg_mask_xlate callback with an operation type parameter
> > (enum gpio_regmap_operation) to allow drivers to return different
> > register/mask combinations depending on the specific GPIO operation.
> >
> > In addition, introduce a new optional 'value_xlate' callback. This
> > routine allows drivers to translate or modify the register value and
> > mask immediately before a write operation. It is particularly useful
> > for hardware that requires additional control bits, such as a
> > write-enable bit, to be appended to the data dynamically.
> >
> > 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 <linusw@xxxxxxxxxx>
> > Signed-off-by: Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx>
> Acked-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
> #for-iio

Hi Jonathan,

Thanks for the Acked-by tag on v6!

However, I have split this patch into two separate patches in the v7.
The the core logic remains the same as in v6.
Just divided for better structure.

Here are the links to the v7 patches:
Link: https://lore.kernel.org/lkml/20260723034237.2501507-6-eleanor.lin@xxxxxxxxxxx/
Link: https://lore.kernel.org/lkml/20260723034237.2501507-7-eleanor.lin@xxxxxxxxxxx/

Best regards,
Yu Chun