* [PATCH v3 0/2] gpio: realtek-otto: add pinctrl support
@ 2026-08-20 7:14 misha.zavertkin
2026-08-20 7:14 ` [PATCH v3 1/2] dt-bindings: gpio: otto-gpio: Add gpio-ranges misha.zavertkin
2026-08-20 7:14 ` [PATCH v3 2/2] gpio: realtek-otto: add pinctrl support misha.zavertkin
0 siblings, 2 replies; 3+ messages in thread
From: misha.zavertkin @ 2026-08-20 7:14 UTC (permalink / raw)
To: linux-gpio
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sander Vanheule,
Bert Vermeulen, devicetree, linux-kernel, Michael Zavertkin
This series adds pinctrl support for RTL9607C and referes it
in documentation.
Signed-off-by: Michael Zavertkin <misha.zavertkin@mail.ru>
---
Changes in v3:
- 'gpio-ranges' is optional in dt-bindings
- pinctrl supported for all SoCs (no-op if disabled in configuration)
- Dropped Reviewed-by (patch changed)
- Link to v2: https://patch.msgid.link/cover.1787130560.git.misha.zavertkin@mail.ru
Changes in v2:
- Add 'required' property to dt-bindings
- Dropped the ellipsis and added Reviewed-by
- Link to v1: https://patch.msgid.link/amRpvtNAwIQak_9y@gamepc
---
Michael Zavertkin (2):
dt-bindings: gpio: otto-gpio: Add gpio-ranges
gpio: realtek-otto: add pinctrl support
.../devicetree/bindings/gpio/realtek,otto-gpio.yaml | 2 ++
drivers/gpio/gpio-realtek-otto.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
--
2.54.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v3 1/2] dt-bindings: gpio: otto-gpio: Add gpio-ranges
2026-08-20 7:14 [PATCH v3 0/2] gpio: realtek-otto: add pinctrl support misha.zavertkin
@ 2026-08-20 7:14 ` misha.zavertkin
2026-08-20 7:14 ` [PATCH v3 2/2] gpio: realtek-otto: add pinctrl support misha.zavertkin
1 sibling, 0 replies; 3+ messages in thread
From: misha.zavertkin @ 2026-08-20 7:14 UTC (permalink / raw)
To: linux-gpio
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sander Vanheule,
Bert Vermeulen, devicetree, linux-kernel, Michael Zavertkin
Add 'gpio-ranges' optional property to reflect driver changes.
Signed-off-by: Michael Zavertkin <misha.zavertkin@mail.ru>
---
Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
index b18f8f0ca0ae..33c25df7b815 100644
--- a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
+++ b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
@@ -40,6 +40,8 @@ properties:
gpio-controller: true
+ gpio-ranges: true
+
ngpios:
minimum: 1
maximum: 32
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH v3 2/2] gpio: realtek-otto: add pinctrl support
2026-08-20 7:14 [PATCH v3 0/2] gpio: realtek-otto: add pinctrl support misha.zavertkin
2026-08-20 7:14 ` [PATCH v3 1/2] dt-bindings: gpio: otto-gpio: Add gpio-ranges misha.zavertkin
@ 2026-08-20 7:14 ` misha.zavertkin
1 sibling, 0 replies; 3+ messages in thread
From: misha.zavertkin @ 2026-08-20 7:14 UTC (permalink / raw)
To: linux-gpio
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sander Vanheule,
Bert Vermeulen, devicetree, linux-kernel, Michael Zavertkin
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@mail.ru>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-20 7:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 7:14 [PATCH v3 0/2] gpio: realtek-otto: add pinctrl support misha.zavertkin
2026-08-20 7:14 ` [PATCH v3 1/2] dt-bindings: gpio: otto-gpio: Add gpio-ranges misha.zavertkin
2026-08-20 7:14 ` [PATCH v3 2/2] gpio: realtek-otto: add pinctrl support misha.zavertkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).