2014-06-05 19:23:03

by Andrew Ruder

[permalink] [raw]
Subject: [PATCH] gpio-pxa: gpio0 and gpio1 support on dt

pxa_gpio_probe() has some issues supporting the gpio0 and gpio1
interrupts under device-tree - it never actually sets up the chain
handler to get interrupts on edge detect for GPIO0 and GPIO1.

Signed-off-by: Andrew Ruder <[email protected]>
---
drivers/gpio/gpio-pxa.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index 42e6e64..19f1a95 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -649,6 +649,11 @@ static int pxa_gpio_probe(struct platform_device *pdev)
handle_edge_irq);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
+ } else {
+ if (irq0 > 0)
+ irq_set_chained_handler(irq0, pxa_gpio_demux_handler);
+ if (irq1 > 0)
+ irq_set_chained_handler(irq1, pxa_gpio_demux_handler);
}

irq_set_chained_handler(irq_mux, pxa_gpio_demux_handler);
--
1.9.0.rc3.12.gbc97e2d


2014-06-12 08:43:17

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] gpio-pxa: gpio0 and gpio1 support on dt

On Thu, Jun 5, 2014 at 9:13 PM, Andrew Ruder
<[email protected]> wrote:

> pxa_gpio_probe() has some issues supporting the gpio0 and gpio1
> interrupts under device-tree - it never actually sets up the chain
> handler to get interrupts on edge detect for GPIO0 and GPIO1.
>
> Signed-off-by: Andrew Ruder <[email protected]>

Makes perfect sense. Can I have an ACK from some PXA
maintainer on this?

The PXA GPIO driver with it's messy irqchip registration looks
like a good candidate for switching to the gpiolib irqchip helpers
and rid some code. Just saying.

Yours,
Linus Walleij

2014-06-17 00:18:39

by Haojian Zhuang

[permalink] [raw]
Subject: Re: [PATCH] gpio-pxa: gpio0 and gpio1 support on dt

On Thu, Jun 12, 2014 at 4:43 PM, Linus Walleij <[email protected]> wrote:
> On Thu, Jun 5, 2014 at 9:13 PM, Andrew Ruder
> <[email protected]> wrote:
>
>> pxa_gpio_probe() has some issues supporting the gpio0 and gpio1
>> interrupts under device-tree - it never actually sets up the chain
>> handler to get interrupts on edge detect for GPIO0 and GPIO1.
>>
>> Signed-off-by: Andrew Ruder <[email protected]>
>
> Makes perfect sense. Can I have an ACK from some PXA
> maintainer on this?
>
> The PXA GPIO driver with it's messy irqchip registration looks
> like a good candidate for switching to the gpiolib irqchip helpers
> and rid some code. Just saying.
>
> Yours,
> Linus Walleij

Acked-by: Haojian Zhuang <[email protected]>

Yes, it's worth to rid some irqchip code.

Regards
Haojian

2014-07-07 10:55:23

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] gpio-pxa: gpio0 and gpio1 support on dt

On Thu, Jun 5, 2014 at 9:13 PM, Andrew Ruder
<[email protected]> wrote:

> pxa_gpio_probe() has some issues supporting the gpio0 and gpio1
> interrupts under device-tree - it never actually sets up the chain
> handler to get interrupts on edge detect for GPIO0 and GPIO1.
>
> Signed-off-by: Andrew Ruder <[email protected]>

Patch applied with Haojian's ACK.

Yours,
Linus Walleij