Skip to content

Commit b0fa00f

Browse files
svanheuleBartosz Golaszewski
authored andcommitted
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>
1 parent 3c83818 commit b0fa00f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpio/gpio-regmap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config
262262
chip->label = config->label ?: dev_name(config->parent);
263263
chip->can_sleep = regmap_might_sleep(config->regmap);
264264

265+
chip->request = gpiochip_generic_request;
266+
chip->free = gpiochip_generic_free;
265267
chip->get = gpio_regmap_get;
266268
if (gpio->reg_set_base && gpio->reg_clr_base)
267269
chip->set = gpio_regmap_set_with_clear;

0 commit comments

Comments
 (0)