diff mbox series

[v3,1/7] gpio: tqmx86: really make IRQ optional

Message ID 34be64092b7b4d0c75085a8c729f5f6fcfb56b61.1626429286.git.matthias.schiffer@ew.tq-group.com
State New
Headers show
Series TQMx86: TQMx110EB and TQMxE40x MFD/GPIO support | expand

Commit Message

Matthias Schiffer July 16, 2021, 10 a.m. UTC
The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This
causes warnings with newer kernels.

Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a
missing IRQ properly.

Fixes: b868db94a6a7 ("gpio: tqmx86: Add GPIO from for this IO controller")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---

v2: add Fixes line
v3: no changes

 drivers/gpio/gpio-tqmx86.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Linus Walleij July 23, 2021, 4:15 p.m. UTC | #1
On Fri, Jul 16, 2021 at 12:01 PM Matthias Schiffer
<matthias.schiffer@ew.tq-group.com> wrote:

> The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This
> causes warnings with newer kernels.
>
> Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a
> missing IRQ properly.
>
> Fixes: b868db94a6a7 ("gpio: tqmx86: Add GPIO from for this IO controller")
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> ---
>
> v2: add Fixes line
> v3: no changes

Acked-by: Linus Walleij <linus.walleij@linaro.org>

I suppose Lee will merge this into MFD with the rest of the patches?
I don't see anything stopping Bart from just merging this one patch
into the GPIO tree though. Only runtime dependencies.

Yours,
Linus Walleij
Bartosz Golaszewski Aug. 2, 2021, 3:18 p.m. UTC | #2
On Fri, Jul 23, 2021 at 6:16 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Fri, Jul 16, 2021 at 12:01 PM Matthias Schiffer
> <matthias.schiffer@ew.tq-group.com> wrote:
>
> > The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This
> > causes warnings with newer kernels.
> >
> > Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a
> > missing IRQ properly.
> >
> > Fixes: b868db94a6a7 ("gpio: tqmx86: Add GPIO from for this IO controller")
> > Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> > ---
> >
> > v2: add Fixes line
> > v3: no changes
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> I suppose Lee will merge this into MFD with the rest of the patches?
> I don't see anything stopping Bart from just merging this one patch
> into the GPIO tree though. Only runtime dependencies.
>
> Yours,
> Linus Walleij

I applied this patch for fixes and will shortly send a PR with some
other fixes to Linus.

Bart
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-tqmx86.c b/drivers/gpio/gpio-tqmx86.c
index 5022e0ad0fae..0f5d17f343f1 100644
--- a/drivers/gpio/gpio-tqmx86.c
+++ b/drivers/gpio/gpio-tqmx86.c
@@ -238,8 +238,8 @@  static int tqmx86_gpio_probe(struct platform_device *pdev)
 	struct resource *res;
 	int ret, irq;
 
-	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
+	irq = platform_get_irq_optional(pdev, 0);
+	if (irq < 0 && irq != -ENXIO)
 		return irq;
 
 	res = platform_get_resource(pdev, IORESOURCE_IO, 0);
@@ -278,7 +278,7 @@  static int tqmx86_gpio_probe(struct platform_device *pdev)
 
 	pm_runtime_enable(&pdev->dev);
 
-	if (irq) {
+	if (irq > 0) {
 		struct irq_chip *irq_chip = &gpio->irq_chip;
 		u8 irq_status;