summaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorYu-Chun Lin <eleanor.lin@realtek.com>2026-07-26 20:51:56 +0800
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-07-30 11:05:06 +0200
commit6c53312b7e2d9a972e509f5bac002e169e241eca (patch)
treed9528020226e5e8da472c5bd3bd755eb1839999a /drivers/iio/adc
parentcf0f6ddd08f37808fd6893e2d9045f069c07a5a7 (diff)
downloadlinux-next-6c53312b7e2d9a972e509f5bac002e169e241eca.tar.gz
linux-next-6c53312b7e2d9a972e509f5bac002e169e241eca.zip
gpio: regmap: Add gpio_regmap_operation to extend reg_mask_xlate callback
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. 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. Acked-by: William Breathitt Gray <wbg@kernel.org> Acked-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> #for-iio Suggested-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com> Link: https://patch.msgid.link/20260726125209.140307-6-eleanor.lin@realtek.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/ad7173.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index 9ee65d63c525..f78e758706ed 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -560,8 +560,8 @@ out:
return ret;
}
-static int ad7173_mask_xlate(struct gpio_regmap *gpio, unsigned int base,
- unsigned int offset, unsigned int *reg,
+static int ad7173_mask_xlate(struct gpio_regmap *gpio, enum gpio_regmap_operation op,
+ unsigned int base, unsigned int offset, unsigned int *reg,
unsigned int *mask)
{
*mask = AD7173_GPO_DATA(offset);
@@ -569,8 +569,8 @@ static int ad7173_mask_xlate(struct gpio_regmap *gpio, unsigned int base,
return 0;
}
-static int ad4111_mask_xlate(struct gpio_regmap *gpio, unsigned int base,
- unsigned int offset, unsigned int *reg,
+static int ad4111_mask_xlate(struct gpio_regmap *gpio, enum gpio_regmap_operation op,
+ unsigned int base, unsigned int offset, unsigned int *reg,
unsigned int *mask)
{
*mask = AD4111_GPO01_DATA(offset);