From: Marco Scardovi <scardracs@disroot.org>
To: Linus Walleij <linusw@kernel.org>, Bartosz Golaszewski <brgl@kernel.org>
Cc: Heiko Stuebner <heiko@sntech.de>,
Jianqun Xu <jay.xu@rock-chips.com>,
linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] gpio: rockchip: use platform_get_irq() to retrieve interrupt
Date: Mon, 8 Jun 2026 01:05:04 +0200 [thread overview]
Message-ID: <20260607230504.35392-4-scardracs@disroot.org> (raw)
In-Reply-To: <20260607230504.35392-1-scardracs@disroot.org>
The driver currently uses irq_of_parse_and_map() to parse and map the
GPIO bank interrupt from the device tree node. Since the bank device is
represented by a platform_device, use the standard platform_get_irq()
API instead. This integrates cleanly with the platform device framework
and ensures proper error propagation (such as -EPROBE_DEFER).
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Marco Scardovi <scardracs@disroot.org>
---
drivers/gpio/gpio-rockchip.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index 8647d006d103..77b239a9a601 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -654,9 +654,10 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)
if (IS_ERR(bank->reg_base))
return PTR_ERR(bank->reg_base);
- bank->irq = irq_of_parse_and_map(bank->of_node, 0);
- if (!bank->irq)
- return -EINVAL;
+ ret = platform_get_irq(pdev, 0);
+ if (ret < 0)
+ return ret;
+ bank->irq = ret;
bank->clk = devm_clk_get_enabled(bank->dev, NULL);
if (IS_ERR(bank->clk))
--
2.54.0
next prev parent reply other threads:[~2026-06-07 23:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 23:05 [PATCH 0/3] gpio: rockchip: Fix generic IRQ chip leak and modernize resource mapping Marco Scardovi
2026-06-07 23:05 ` [PATCH 1/3] gpio: rockchip: fix generic IRQ chip leak on remove Marco Scardovi
2026-06-07 23:05 ` [PATCH 2/3] gpio: rockchip: use devm_platform_ioremap_resource() to map registers Marco Scardovi
2026-06-07 23:05 ` Marco Scardovi [this message]
2026-06-09 11:24 ` (subset) [PATCH 0/3] gpio: rockchip: Fix generic IRQ chip leak and modernize resource mapping Bartosz Golaszewski
2026-06-26 7:54 ` Bartosz Golaszewski
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=20260607230504.35392-4-scardracs@disroot.org \
--to=scardracs@disroot.org \
--cc=brgl@kernel.org \
--cc=heiko@sntech.de \
--cc=jay.xu@rock-chips.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.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