pinctrl: cy8c95x0: use new pinctrl GPIO helpers
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 3 Oct 2023 08:21:02 +0000 (10:21 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 4 Nov 2023 09:23:20 +0000 (10:23 +0100)
Replace the pinctrl helpers taking the global GPIO number as argument
with the improved variants that instead take a pointer to the GPIO chip
and the controller-relative offset.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-cy8c95x0.c

index fae80b52a6fc6676b743575136b1beebc6546fbe..8c6006353515458850b3704ffd9cd53a6e55a325 100644 (file)
@@ -554,7 +554,7 @@ out:
 
 static int cy8c95x0_gpio_direction_input(struct gpio_chip *gc, unsigned int off)
 {
-       return pinctrl_gpio_direction_input(gc->base + off);
+       return pinctrl_gpio_direction_input_new(gc, off);
 }
 
 static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc,
@@ -571,7 +571,7 @@ static int cy8c95x0_gpio_direction_output(struct gpio_chip *gc,
        if (ret)
                return ret;
 
-       return pinctrl_gpio_direction_output(gc->base + off);
+       return pinctrl_gpio_direction_output_new(gc, off);
 }
 
 static int cy8c95x0_gpio_get_value(struct gpio_chip *gc, unsigned int off)