summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-10-13 15:02:14 +0300
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-11-04 12:23:19 +0300
commit481a59fb3d988b2d86c86a341b8040804ed9a282 (patch)
tree9e32ea6936cc121a4df47e698824a05da109bb9d /drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
parentc54d686d7d9975c2bdc5fca6ec30f1600817a628 (diff)
downloadlinux-481a59fb3d988b2d86c86a341b8040804ed9a282.tar.xz
pinctrl: nuvoton: npcm8xx: use new pinctrl GPIO helpers
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: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c')
-rw-r--r--drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
index da21f6a45888..0b6d6964087e 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm8xx.c
@@ -173,7 +173,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset)
struct npcm8xx_gpio *bank = gpiochip_get_data(chip);
int ret;
- ret = pinctrl_gpio_direction_input(offset + chip->base);
+ ret = pinctrl_gpio_direction_input_new(chip, offset);
if (ret)
return ret;
@@ -186,7 +186,7 @@ static int npcmgpio_direction_output(struct gpio_chip *chip,
struct npcm8xx_gpio *bank = gpiochip_get_data(chip);
int ret;
- ret = pinctrl_gpio_direction_output(offset + chip->base);
+ ret = pinctrl_gpio_direction_output_new(chip, offset);
if (ret)
return ret;
@@ -198,7 +198,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset)
struct npcm8xx_gpio *bank = gpiochip_get_data(chip);
int ret;
- ret = pinctrl_gpio_request(offset + chip->base);
+ ret = pinctrl_gpio_request_new(chip, offset);
if (ret)
return ret;
@@ -207,7 +207,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset)
static void npcmgpio_gpio_free(struct gpio_chip *chip, unsigned int offset)
{
- pinctrl_gpio_free(offset + chip->base);
+ pinctrl_gpio_free_new(chip, offset);
}
static void npcmgpio_irq_handler(struct irq_desc *desc)