Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v6 0/8]  gpio: realtek: Add support for Realtek DHC RTD1625
@ 2026-07-21  6:57 Yu-Chun Lin
  2026-07-21  6:57 ` [PATCH v6 1/8] Revert "gpio: realtek: Add driver for Realtek DHC RTD1625 SoC" Yu-Chun Lin
                   ` (7 more replies)
  0 siblings, 8 replies; 25+ messages in thread
From: Yu-Chun Lin @ 2026-07-21  6:57 UTC (permalink / raw)
  To: linusw, andriy.shevchenko, mwalle, brgl, tychang, wbg,
	mathieu.dubois-briand, nuno.sa, Michael.Hennerich, jic23, andy,
	u.kleine-koenig, dakr, bhelgaas, o-takashi
  Cc: eleanor.lin, dlechner, linux-kernel, linux-gpio, linux, linux-iio,
	cy.huang, james.tai

For better review flow, this series includes Andy Shevchenko's
gpio-regmap fix patches [1] as a prerequisite. The first patch
reverts the previously applied patch from Bartosz Golaszewski.

This series then adds GPIO support for the Realtek DHC RTD1625 SoC.

Unlike the existing driver (gpio-rtd.c) which uses shared bank
registers, the RTD1625 features a per-pin register architecture where
each GPIO line is managed by its own dedicated 32-bit control register.
This distinct hardware design requires a new, separate driver.

Link: https://lore.kernel.org/lkml/20260702130903.1790633-1-andriy.shevchenko@linux.intel.com/ [1]
---
Changes in v6:
- The dt-binding patch has already been applied by Bartosz and remains
unchanged. The DTS patch has been applied separately.

Patch 2 & 3:
- Move gpio_regmap_irq_reqres() and gpio_regmap_irq_relres() implementation
  from patch 2 to patch 3 for better split.

Patch 3:
- Add '_maybe_unused' to prevent build fail when CONFIG_REGMAP_IRQ is not
enabled.

Patch 5:
- Remove removed the hardcoded write-enable workarounds.
- Retain the necessary prototype updates in every driver using custom
reg_mask_xlate
- Add value_xlate to dynamically adjust the register mask and value right
before the actual register write operation.

Patch 8:
- Add 'select REGMAP_MMIO' into Kconfig.
- Replace GPIOCHIP_IRQ_RESOURCE_HELPERS with explicit irq_request_resources
and irq_release_resources callbacks using gpio_regmap_reqres_irq() and
gpio_regmap_relres_irq() introduced by Andy's patches.
- Replace the '*mask = 0' hack with 'return -ENOTSUPP'.
- Move variable operations out of scoped_guard().
- Add 'struct lock_class_key' to irq_domain map for proper lockdep annotation.
- Remove redundant 'ret' variable.
- Make regmap disable_locking depend on CONFIG_DEBUG_GPIO to avoid
dropping debugfs support unconditionally.
- Replace irq_domain_add_linear() with irq_domain_create_linear() using
dev_fwnode(dev), and manage lifetime with devm_add_action_or_reset().

v5: https://lore.kernel.org/lkml/20260702090115.2564318-1-eleanor.lin@realtek.com/
v4: https://lore.kernel.org/lkml/20260622092335.1166876-1-eleanor.lin@realtek.com/
v3: https://lore.kernel.org/lkml/20260512033317.1602537-1-eleanor.lin@realtek.com/
v2: https://lore.kernel.org/lkml/20260408025243.1155482-1-eleanor.lin@realtek.com/
v1: https://lore.kernel.org/lkml/20260331113835.3510341-1-eleanor.lin@realtek.com/

Andy Shevchenko (3):
  gpio: regmap: Provide default IRQ resource request and release
    callbacks
  gpio: regmap: Apply default resource callbacks for regmap IRQ chip
  gpio: regmap: Order kernel-doc descriptions with the actual appearance

Tzuyi Chang (1):
  gpio: realtek: Add driver for Realtek DHC RTD1625 SoC

Yu-Chun Lin (4):
  Revert "gpio: realtek: Add driver for Realtek DHC RTD1625 SoC"
  gpio: regmap: Add gpio_regmap_operation and value_xlate support
  gpio: regmap: Add set_config callback
  gpio: regmap: Add IRQ enable/disable helpers

 drivers/gpio/Kconfig                  |   2 +
 drivers/gpio/gpio-104-idi-48.c        |   7 +-
 drivers/gpio/gpio-i8255.c             |   4 +-
 drivers/gpio/gpio-idio-16.c           |   6 +-
 drivers/gpio/gpio-max7360.c           |   8 +-
 drivers/gpio/gpio-pcie-idio-24.c      |   6 +-
 drivers/gpio/gpio-regmap.c            | 101 ++++++-
 drivers/gpio/gpio-rtd1625.c           | 382 +++++++++++++++-----------
 drivers/iio/adc/ad7173.c              |   8 +-
 drivers/iio/addac/stx104.c            |   6 +-
 drivers/pinctrl/bcm/pinctrl-bcm63xx.c |   1 +
 drivers/pinctrl/pinctrl-tps6594.c     |   1 +
 include/linux/gpio/regmap.h           |  75 ++++-
 13 files changed, 401 insertions(+), 206 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2026-07-21 12:11 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21  6:57 [PATCH v6 0/8] gpio: realtek: Add support for Realtek DHC RTD1625 Yu-Chun Lin
2026-07-21  6:57 ` [PATCH v6 1/8] Revert "gpio: realtek: Add driver for Realtek DHC RTD1625 SoC" Yu-Chun Lin
2026-07-21 10:39   ` Andy Shevchenko
2026-07-21  6:57 ` [PATCH v6 2/8] gpio: regmap: Provide default IRQ resource request and release callbacks Yu-Chun Lin
2026-07-21  7:05   ` Michael Walle
2026-07-21  6:57 ` [PATCH v6 3/8] gpio: regmap: Apply default resource callbacks for regmap IRQ chip Yu-Chun Lin
2026-07-21  7:07   ` Michael Walle
2026-07-21  6:57 ` [PATCH v6 4/8] gpio: regmap: Order kernel-doc descriptions with the actual appearance Yu-Chun Lin
2026-07-21  7:07   ` Michael Walle
2026-07-21 10:43   ` Andy Shevchenko
2026-07-21  6:57 ` [PATCH v6 5/8] gpio: regmap: Add gpio_regmap_operation and value_xlate support Yu-Chun Lin
2026-07-21  7:15   ` Michael Walle
2026-07-21 10:34     ` Yu-Chun Lin [林祐君]
2026-07-21 10:46   ` Andy Shevchenko
2026-07-21  6:58 ` [PATCH v6 6/8] gpio: regmap: Add set_config callback Yu-Chun Lin
2026-07-21  7:23   ` Michael Walle
2026-07-21 10:46     ` Yu-Chun Lin [林祐君]
2026-07-21 11:18       ` Michael Walle
2026-07-21 12:10         ` Yu-Chun Lin [林祐君]
2026-07-21  6:58 ` [PATCH v6 7/8] gpio: regmap: Add IRQ enable/disable helpers Yu-Chun Lin
2026-07-21  7:24   ` Michael Walle
2026-07-21 10:54   ` Andy Shevchenko
2026-07-21  6:58 ` [PATCH v6 8/8] gpio: realtek: Add driver for Realtek DHC RTD1625 SoC Yu-Chun Lin
2026-07-21 11:12   ` Andy Shevchenko
2026-07-21 12:09     ` Yu-Chun Lin [林祐君]

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox