[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bfeefbd89ee5a889c4ad0549f6a60f132b332d6b.1717499766.git.matthias.schiffer@ew.tq-group.com>
Date: Wed, 5 Jun 2024 09:04:02 +0200
From: Matthias Schiffer <matthias.schiffer@...tq-group.com>
To: Lee Jones <lee@...nel.org>
Cc: linux-kernel@...r.kernel.org,
Gregor Herburger <gregor.herburger@...group.com>,
linux@...tq-group.com,
Matthias Schiffer <matthias.schiffer@...tq-group.com>
Subject: [PATCH 3/4] mfd: tqmx86: make IRQ setup errors non-fatal
GPIO IRQ setup can fail either because an invalid IRQ was passed as a
parameter, or because the GPIO controller does not support interrupts.
Neither is severe enough to stop the whole probe; simply disable IRQ
support in the GPIO resource when setup fails.
Signed-off-by: Matthias Schiffer <matthias.schiffer@...tq-group.com>
---
drivers/mfd/tqmx86.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mfd/tqmx86.c b/drivers/mfd/tqmx86.c
index 2a4ce114d5905..cf27497245322 100644
--- a/drivers/mfd/tqmx86.c
+++ b/drivers/mfd/tqmx86.c
@@ -259,13 +259,14 @@ static int tqmx86_probe(struct platform_device *pdev)
err = tqmx86_setup_irq(dev, "GPIO", gpio_irq, io_base,
TQMX86_REG_IO_EXT_INT_GPIO_SHIFT);
if (err)
- return err;
+ gpio_irq = 0;
+ }
+ if (gpio_irq)
/* Assumes the IRQ resource is first. */
tqmx_gpio_resources[0].start = gpio_irq;
- } else {
+ else
tqmx_gpio_resources[0].flags = 0;
- }
ocores_platform_data.clock_khz = tqmx86_board_id_to_clk_rate(dev, board_id);
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/
Powered by blists - more mailing lists