Skip to content

Add gpio driver support for Realtek DHC SoCs

Tzuyi Chang linux-devicetree linux-gpio lkml 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesIn review
  2. v42 patches 8 repliesSuperseded
  3. v32 patches 14 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches6 repliesSuperseded
v12 patches9 repliesSuperseded

Changes in v5 from the cover letter

1. Add more description in the Kconfig.
2. Add comment for the counter-intuitive number 31.
3. Convert to use cleanup API and module_platform_driver() macro.
4. Simplify some of the code as suggested in patch v4.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: gpio: realtek: Add realtek,rtd-gpioDocumentation/devicetree/bindings/gpio/realtek,rtd-gpio.yaml+69 -00 replies
2/2Add GPIO support for Realtek DHC(Digital Home Center) RTD SoCs.drivers/gpio/Kconfig drivers/gpio/Makefile drivers/gpio/gpio-rtd.c+618 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiLinus Walleij
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/2] Add gpio driver support for Realtek DHC SoCs

These patches add the bindings and the gpio driver for Realtek DHC(Digital Home Center) RTD SoCs, including RTD1295, RTD1395, RTD1619, RTD1319, RTD1619B, RTD1319D and RTD1315E.

Change log:
v4->v5:
1. Add more description in the Kconfig.
2. Add comment for the counter-intuitive number 31.
3. Convert to use cleanup API and module_platform_driver() macro.
4. Simplify some of the code as suggested in patch v4.
v3->v4:
1. Arrange the compatible list in alphanumerical order.
2. Remove the size check for the offset array.
3. Add the debounce callback.
4. Conducted a review of the critical section, employing raw_spinlock_t for locking purposes.
5. Add gpiochip_enable_irq/gpiochip_disable_irq to fulfill the immutability requirements.
6. Use irqd_to_hwirq to get hwirq.
v2->v3:
1. Remove generic compatible and use SoC-specific compatible instead.
2. Add the missing descriptions for the rtd_gpio_info structure members.
3. Assign gpio_chip fwnode.
v1->v2:
1. Add description for DHC RTD SoCs in the bindings.
2. Revise the compatible names in the bindings.
3. Transitioned from OF API to platform_device API.
4. Use u8 for the offset array within the rtd_gpio_info structure.
5. Record the size of each array within the rtd_gpio_info structure and implement checks to prevent out-of-bounds access.
6. Use GPIOLIB_IRQCHIP helpers to register interrupts.
7. Use dynamic allocation for GPIO base.

Tzuyi Chang (2):
dt-bindings: gpio: realtek: Add realtek,rtd-gpio
Add GPIO support for Realtek DHC(Digital Home Center) RTD SoCs.

 .../bindings/gpio/realtek,rtd-gpio.yaml       |  69 ++
 drivers/gpio/Kconfig                          |  13 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-rtd.c                       | 604 ++++++++++++++++++
 4 files changed, 687 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/realtek,rtd-gpio.yaml
 create mode 100644 drivers/gpio/gpio-rtd.c
Signature · 1 line
2.43.0