pinctrl: cirrus: use new pinctrl GPIO helpers
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 3 Oct 2023 08:12:12 +0000 (10:12 +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>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/cirrus/pinctrl-cs42l43.c
drivers/pinctrl/cirrus/pinctrl-lochnagar.c

index c096463184195589a1b17887688bf0423ddf683c..097e4dcdda36ac3e3772deba31e5f337c89e4769 100644 (file)
@@ -508,7 +508,7 @@ static void cs42l43_gpio_set(struct gpio_chip *chip, unsigned int offset, int va
 
 static int cs42l43_gpio_direction_in(struct gpio_chip *chip, unsigned int offset)
 {
-       return pinctrl_gpio_direction_input(chip->base + offset);
+       return pinctrl_gpio_direction_input_new(chip, offset);
 }
 
 static int cs42l43_gpio_direction_out(struct gpio_chip *chip,
@@ -516,7 +516,7 @@ static int cs42l43_gpio_direction_out(struct gpio_chip *chip,
 {
        cs42l43_gpio_set(chip, offset, value);
 
-       return pinctrl_gpio_direction_output(chip->base + offset);
+       return pinctrl_gpio_direction_output_new(chip, offset);
 }
 
 static int cs42l43_gpio_add_pin_ranges(struct gpio_chip *chip)
index 0b78cf611afe00c185ccc6f819f0d58f7cb681d0..f3c8a8c14e14b91ceaa15250f94ddfe2199dd186 100644 (file)
@@ -1098,7 +1098,7 @@ static int lochnagar_gpio_direction_out(struct gpio_chip *chip,
 {
        lochnagar_gpio_set(chip, offset, value);
 
-       return pinctrl_gpio_direction_output(chip->base + offset);
+       return pinctrl_gpio_direction_output_new(chip, offset);
 }
 
 static int lochnagar_fill_func_groups(struct lochnagar_pin_priv *priv)