[PATCH v3 2/2] gpio: realtek-otto: add pinctrl support

From: misha . zavertkin

Date: Thu Aug 20 2026 - 03:30:07 EST


RTL9607C relies on pinctrl to mux SoC pins. Use pinctrl to request pins
for GPIO.
pinctrl driver for other SoCs might be implemented later.

Signed-off-by: Michael Zavertkin <misha.zavertkin@xxxxxxx>
---
drivers/gpio/gpio-realtek-otto.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpio-realtek-otto.c b/drivers/gpio/gpio-realtek-otto.c
index 4a606bad5848..01be8baa25c3 100644
--- a/drivers/gpio/gpio-realtek-otto.c
+++ b/drivers/gpio/gpio-realtek-otto.c
@@ -393,13 +393,14 @@ static int realtek_gpio_probe(struct platform_device *pdev)

raw_spin_lock_init(&ctrl->lock);

+ gen_gc_flags = GPIO_GENERIC_PINCTRL_BACKEND;
+
if (dev_flags & GPIO_PORTS_REVERSED) {
- gen_gc_flags = 0;
ctrl->bank_read = realtek_gpio_bank_read;
ctrl->bank_write = realtek_gpio_bank_write;
ctrl->line_imr_pos = realtek_gpio_line_imr_pos;
} else {
- gen_gc_flags = GPIO_GENERIC_BIG_ENDIAN_BYTE_ORDER;
+ gen_gc_flags |= GPIO_GENERIC_BIG_ENDIAN_BYTE_ORDER;
ctrl->bank_read = realtek_gpio_bank_read_swapped;
ctrl->bank_write = realtek_gpio_bank_write_swapped;
ctrl->line_imr_pos = realtek_gpio_line_imr_pos_swapped;
--
2.54.0