summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-regmap.c
diff options
context:
space:
mode:
authorSander Vanheule <sander@svanheule.net>2025-01-07 21:16:20 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-01-13 09:20:25 +0100
commitb0fa00fe38f673c986633c11087274deeb7ce7b0 (patch)
tree969cc805f0af726fbd1d7ef5c3b79f173f2d71b6 /drivers/gpio/gpio-regmap.c
parent3c838184407f3e0b28cd86a7275ffc2f9e790efa (diff)
downloadlinux-b0fa00fe38f673c986633c11087274deeb7ce7b0.tar.gz
linux-b0fa00fe38f673c986633c11087274deeb7ce7b0.tar.bz2
linux-b0fa00fe38f673c986633c11087274deeb7ce7b0.zip
gpio: regmap: Use generic request/free ops
Set the gpiochip request and free ops to the generic implementations. This way a user can provide a gpio-ranges property defined for a pinmux, easing muxing of gpio functions. Provided that the pin controller implementents the pinmux op .gpio_request_enable(), pins will automatically be muxed to their GPIO function when requested. Signed-off-by: Sander Vanheule <sander@svanheule.net> Acked-by: Michael Walle <mwalle@kernel.org> Link: https://lore.kernel.org/r/20250107201621.12467-1-sander@svanheule.net Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-regmap.c')
-rw-r--r--drivers/gpio/gpio-regmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index 71684dee2ca5..05f8781b5204 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -262,6 +262,8 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
chip->label = config->label ?: dev_name(config->parent);
chip->can_sleep = regmap_might_sleep(config->regmap);
+ chip->request = gpiochip_generic_request;
+ chip->free = gpiochip_generic_free;
chip->get = gpio_regmap_get;
if (gpio->reg_set_base && gpio->reg_clr_base)
chip->set = gpio_regmap_set_with_clear;