Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH] pinctrl: samsung: exynos: replace irq_of_parse_and_map with modern APIs
@ 2026-07-27 19:48 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-07-27 19:48 UTC (permalink / raw)
  To: linux-samsung-soc
  Cc: Krzysztof Kozlowski, Sylwester Nawrocki, Peter Griffin,
	Alim Akhtar, Linus Walleij,
	moderated list:PIN CONTROLLER - SAMSUNG,
	open list:PIN CONTROL SUBSYSTEM, open list

Replace irq_of_parse_and_map() with fwnode_irq_get() for per-pin IRQ
lookup and of_irq_get() for the muxed EINT IRQ. The fwnode-based API
works with both OF and ACPI fwnodes and follows modern conventions.

For the muxed EINT path, change the error handling to propagate the
error code rather than silently returning 0.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/pinctrl/samsung/pinctrl-exynos.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c
index 81fe0b08a9af..5bef230f5bed 100644
--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -824,8 +824,8 @@ __init int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
 			return -ENOMEM;
 
 		for (idx = 0; idx < bank->nr_pins; ++idx) {
-			irq = irq_of_parse_and_map(to_of_node(bank->fwnode), idx);
-			if (!irq) {
+			irq = fwnode_irq_get(bank->fwnode, idx);
+			if (irq < 0) {
 				dev_err(dev, "irq number for eint-%s-%d not found\n",
 							bank->name, idx);
 				continue;
@@ -841,11 +841,9 @@ __init int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
 	if (!muxed_banks)
 		return 0;
 
-	irq = irq_of_parse_and_map(wkup_np, 0);
-	if (!irq) {
-		dev_err(dev, "irq number for muxed EINTs not found\n");
-		return 0;
-	}
+	irq = of_irq_get(wkup_np, 0);
+	if (irq < 0)
+		return irq;
 
 	muxed_data = devm_kzalloc(dev, sizeof(*muxed_data)
 		+ muxed_banks*sizeof(struct samsung_pin_bank *), GFP_KERNEL);
-- 
2.55.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-27 19:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 19:48 [PATCH] pinctrl: samsung: exynos: replace irq_of_parse_and_map with modern APIs Rosen Penev

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