gpio: rockchip: 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: Heiko Stuebner <heiko@sntech.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Bartosz Golaszewski 2023-10-03 10:06:22 +02:00
parent 566e684e70
commit 7233d90aea

View 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);