summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-10-13 14:02:00 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-11-04 10:23:19 +0100
commitc54d686d7d9975c2bdc5fca6ec30f1600817a628 (patch)
tree056792886aeb755c23d06f3722e27cf3f77defe5
parent506e94e1084fec07f0f657883f4d5845c0c76bd5 (diff)
pinctrl: nuvoton: npcm7xx: 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>
-rw-r--r--drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 8bdd0124e2eb..62134a7f0b4e 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -171,7 +171,7 @@ static int npcmgpio_direction_input(struct gpio_chip *chip, unsigned int offset)
struct npcm7xx_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;
@@ -188,7 +188,7 @@ static int npcmgpio_direction_output(struct gpio_chip *chip,
dev_dbg(chip->parent, "gpio_direction_output: offset%d = %x\n", offset,
value);
- ret = pinctrl_gpio_direction_output(offset + chip->base);
+ ret = pinctrl_gpio_direction_output_new(chip, offset);
if (ret)
return ret;
@@ -201,7 +201,7 @@ static int npcmgpio_gpio_request(struct gpio_chip *chip, unsigned int offset)
int ret;
dev_dbg(chip->parent, "gpio_request: offset%d\n", offset);
- ret = pinctrl_gpio_request(offset + chip->base);
+ ret = pinctrl_gpio_request_new(chip, offset);
if (ret)
return ret;
@@ -211,7 +211,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)
{
dev_dbg(chip->parent, "gpio_free: offset%d\n", offset);
- pinctrl_gpio_free(offset + chip->base);
+ pinctrl_gpio_free_new(chip, offset);
}
static void npcmgpio_irq_handler(struct irq_desc *desc)