gpio: rockchip: use new pinctrl GPIO helpers
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 3 Oct 2023 08:06:22 +0000 (10:06 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sat, 4 Nov 2023 09:23:19 +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: Heiko Stuebner <heiko@sntech.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-rockchip.c

index 23040a8cea34e36fa58b2000d7426fe8e4f7986b..3576793f0bd9d0221fd071eaa890e678199a8f27 100644 (file)
@@ -159,9 +159,9 @@ static int rockchip_gpio_set_direction(struct gpio_chip *chip,
 
 
        if (input)
-               pinctrl_gpio_direction_input(bank->pin_base + offset);
+               pinctrl_gpio_direction_input_new(chip, offset);
        else
-               pinctrl_gpio_direction_output(bank->pin_base + offset);
+               pinctrl_gpio_direction_output_new(chip, offset);
 
        raw_spin_lock_irqsave(&bank->slock, flags);
        rockchip_gpio_writel_bit(bank, offset, data, bank->gpio_regs->port_ddr);