[SRU][J/N:linux-bluefield][PATCH v1 1/1] gpio: mlxbf2: use platform_get_irq_optional()

David Thompson davthompson at nvidia.com
Tue Aug 5 20:37:15 UTC 2025


BugLink: https://bugs.launchpad.net/bugs/2119569

The gpio-mlxbf2 driver interfaces with four GPIO controllers,
device instances 0-3. There are two IRQ resources shared between
the four controllers, and they are found in the ACPI table for
instances 0 and 3. The driver should not use platform_get_irq(),
otherwise this error is logged when probing instances 1 and 2:
  mlxbf2_gpio MLNXBF22:01: error -ENXIO: IRQ index 0 not found

Fixes: 2b725265cb08 ("gpio: mlxbf2: Introduce IRQ support")
Cc: stable at vger.kernel.org
Signed-off-by: David Thompson <davthompson at nvidia.com>
Reviewed-by: Shravan Kumar Ramani <shravankr at nvidia.com>
Reviewed-by: Mika Westerberg <mika.westerberg at linux.intel.com>
Link: https://lore.kernel.org/r/20250728144619.29894-1-davthompson@nvidia.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
(cherry picked from commit 63c7bc53a35e785accdc2ceab8f72d94501931ab)
Signed-off-by: David Thompson <davthompson at nvidia.com>
---
 drivers/gpio/gpio-mlxbf2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-mlxbf2.c b/drivers/gpio/gpio-mlxbf2.c
index 55c373ff5dc9..cdf6ff49a128 100644
--- a/drivers/gpio/gpio-mlxbf2.c
+++ b/drivers/gpio/gpio-mlxbf2.c
@@ -378,7 +378,7 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
 	gc->ngpio = npins;
 	gc->owner = THIS_MODULE;
 
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq >= 0) {
 		gs->irq_chip.name = name;
 		gs->irq_chip.irq_set_type = mlxbf2_gpio_irq_set_type;
-- 
2.43.2




More information about the kernel-team mailing list