From: Tzuyi Chang <tychang@realtek.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Andy Shevchenko <andy@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: <linux-gpio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, TY Chang <tychang@realtek.com>
Subject: [PATCH v4 0/2] Add gpio driver support for Realtek DHC SoCs
Date: Fri, 22 Dec 2023 15:58:10 +0800 [thread overview]
Message-ID: <20231222075812.6540-1-tychang@realtek.com> (raw)
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:
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 | 9 +
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-rtd.c | 616 ++++++++++++++++++
4 files changed, 695 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/realtek,rtd-gpio.yaml
create mode 100644 drivers/gpio/gpio-rtd.c
--
2.43.0
next reply other threads:[~2023-12-22 7:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 7:58 Tzuyi Chang [this message]
2023-12-22 7:58 ` [PATCH v4 1/2] dt-bindings: gpio: realtek: Add realtek,rtd-gpio Tzuyi Chang
2023-12-23 14:19 ` Krzysztof Kozlowski
2023-12-22 7:58 ` [PATCH v4 2/2] Add GPIO support for Realtek DHC(Digital Home Center) RTD SoCs Tzuyi Chang
2023-12-22 13:13 ` Andy Shevchenko
2023-12-26 7:34 ` TY_Chang[張子逸]
2023-12-27 16:17 ` Andy Shevchenko
2023-12-28 2:27 ` TY_Chang[張子逸]
2023-12-23 14:19 ` Krzysztof Kozlowski
2023-12-25 19:52 ` Andy Shevchenko
2023-12-26 7:34 ` TY_Chang[張子逸]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231222075812.6540-1-tychang@realtek.com \
--to=tychang@realtek.com \
--cc=andy@kernel.org \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox