* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
@ 2012-06-06 9:49 Uwe Kleine-König
2012-06-07 2:21 ` Shawn Guo
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2012-06-06 9:49 UTC (permalink / raw)
To: linux-arm-kernel
The chained handler was set for the platform device with id == 0.
When the gpio devices are instantiated by a device tree, all have id ==
-1 and so the handler was unset resulting in unusable gpio irqs on
i.MX21 and i.MX27 (when using oftree).
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
Hello,
I'm not sure this is material for stable because it never worked before.
Best regards
Uwe
drivers/gpio/gpio-mxc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index e791476..5c42daf 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -398,10 +398,12 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
writel(~0, port->base + GPIO_ISR);
if (mxc_gpio_hwtype == IMX21_GPIO) {
- /* setup one handler for all GPIO interrupts */
- if (pdev->id == 0)
- irq_set_chained_handler(port->irq,
- mx2_gpio_irq_handler);
+ /*
+ * Setup one handler for all GPIO interrupts. Actually setting
+ * the handler is needed only once, but doing it for every port
+ * is more robust and easier.
+ */
+ irq_set_chained_handler(port->irq, mx2_gpio_irq_handler);
} else {
/* setup one handler for each entry */
irq_set_chained_handler(port->irq, mx3_gpio_irq_handler);
--
1.7.10
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
2012-06-06 9:49 [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices Uwe Kleine-König
@ 2012-06-07 2:21 ` Shawn Guo
2012-07-02 9:31 ` Sascha Hauer
2012-07-05 13:46 ` Linus Walleij
2 siblings, 0 replies; 7+ messages in thread
From: Shawn Guo @ 2012-06-07 2:21 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 06, 2012 at 11:49:23AM +0200, Uwe Kleine-K?nig wrote:
> The chained handler was set for the platform device with id == 0.
> When the gpio devices are instantiated by a device tree, all have id ==
> -1 and so the handler was unset resulting in unusable gpio irqs on
> i.MX21 and i.MX27 (when using oftree).
>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Hi Uwe,
Thanks for fixing this up.
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Regards,
Shawn
> ---
> Hello,
>
> I'm not sure this is material for stable because it never worked before.
>
> Best regards
> Uwe
>
> drivers/gpio/gpio-mxc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index e791476..5c42daf 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -398,10 +398,12 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
> writel(~0, port->base + GPIO_ISR);
>
> if (mxc_gpio_hwtype == IMX21_GPIO) {
> - /* setup one handler for all GPIO interrupts */
> - if (pdev->id == 0)
> - irq_set_chained_handler(port->irq,
> - mx2_gpio_irq_handler);
> + /*
> + * Setup one handler for all GPIO interrupts. Actually setting
> + * the handler is needed only once, but doing it for every port
> + * is more robust and easier.
> + */
> + irq_set_chained_handler(port->irq, mx2_gpio_irq_handler);
> } else {
> /* setup one handler for each entry */
> irq_set_chained_handler(port->irq, mx3_gpio_irq_handler);
> --
> 1.7.10
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
2012-06-06 9:49 [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices Uwe Kleine-König
2012-06-07 2:21 ` Shawn Guo
@ 2012-07-02 9:31 ` Sascha Hauer
2012-07-02 12:59 ` Linus Walleij
2012-07-05 13:46 ` Linus Walleij
2 siblings, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2012-07-02 9:31 UTC (permalink / raw)
To: linux-arm-kernel
[Added Linus to Cc]
Has this been applied? Linus, it seems you handle gpio patches now, you
probably missed it because you haven't been on Cc.
Sascha
On Wed, Jun 06, 2012 at 11:49:23AM +0200, Uwe Kleine-K?nig wrote:
> The chained handler was set for the platform device with id == 0.
> When the gpio devices are instantiated by a device tree, all have id ==
> -1 and so the handler was unset resulting in unusable gpio irqs on
> i.MX21 and i.MX27 (when using oftree).
>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
>
> I'm not sure this is material for stable because it never worked before.
>
> Best regards
> Uwe
>
> drivers/gpio/gpio-mxc.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index e791476..5c42daf 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -398,10 +398,12 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev)
> writel(~0, port->base + GPIO_ISR);
>
> if (mxc_gpio_hwtype == IMX21_GPIO) {
> - /* setup one handler for all GPIO interrupts */
> - if (pdev->id == 0)
> - irq_set_chained_handler(port->irq,
> - mx2_gpio_irq_handler);
> + /*
> + * Setup one handler for all GPIO interrupts. Actually setting
> + * the handler is needed only once, but doing it for every port
> + * is more robust and easier.
> + */
> + irq_set_chained_handler(port->irq, mx2_gpio_irq_handler);
> } else {
> /* setup one handler for each entry */
> irq_set_chained_handler(port->irq, mx3_gpio_irq_handler);
> --
> 1.7.10
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
2012-07-02 9:31 ` Sascha Hauer
@ 2012-07-02 12:59 ` Linus Walleij
2012-07-04 23:38 ` Linus Walleij
0 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2012-07-02 12:59 UTC (permalink / raw)
To: linux-arm-kernel
On 07/02/2012 11:31 AM, Sascha Hauer wrote:
> [Added Linus to Cc]
>
> Has this been applied? Linus, it seems you handle gpio patches now, you
> probably missed it because you haven't been on Cc.
No I don't, sorry. I try to help Grant with review but I haven't
taken over any trees or merging. If I did I would only have to
funnel it to Grant anyway.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
2012-07-02 12:59 ` Linus Walleij
@ 2012-07-04 23:38 ` Linus Walleij
2012-07-05 6:21 ` Sascha Hauer
0 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2012-07-04 23:38 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jul 2, 2012 at 2:59 PM, Linus Walleij
<linus.walleij@stericsson.com> wrote:
> On 07/02/2012 11:31 AM, Sascha Hauer wrote:
>>
>> [Added Linus to Cc]
>>
>> Has this been applied? Linus, it seems you handle gpio patches now, you
>> probably missed it because you haven't been on Cc.
>
> No I don't, sorry. I try to help Grant with review but I haven't
> taken over any trees or merging. If I did I would only have to
> funnel it to Grant anyway.
Famous last words, I wasn't in sync with my mail log and Grant
did ask me to do that...
But now I need to set up a GPIO tree and funnel it to linux-next first.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
2012-07-04 23:38 ` Linus Walleij
@ 2012-07-05 6:21 ` Sascha Hauer
0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2012-07-05 6:21 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Jul 05, 2012 at 01:38:33AM +0200, Linus Walleij wrote:
> On Mon, Jul 2, 2012 at 2:59 PM, Linus Walleij
> <linus.walleij@stericsson.com> wrote:
> > On 07/02/2012 11:31 AM, Sascha Hauer wrote:
> >>
> >> [Added Linus to Cc]
> >>
> >> Has this been applied? Linus, it seems you handle gpio patches now, you
> >> probably missed it because you haven't been on Cc.
> >
> > No I don't, sorry. I try to help Grant with review but I haven't
> > taken over any trees or merging. If I did I would only have to
> > funnel it to Grant anyway.
>
> Famous last words, I wasn't in sync with my mail log and Grant
> did ask me to do that...
nice ;)
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices
2012-06-06 9:49 [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices Uwe Kleine-König
2012-06-07 2:21 ` Shawn Guo
2012-07-02 9:31 ` Sascha Hauer
@ 2012-07-05 13:46 ` Linus Walleij
2 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2012-07-05 13:46 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jun 6, 2012 at 11:49 AM, Uwe Kleine-K?nig
<u.kleine-koenig@pengutronix.de> wrote:
> The chained handler was set for the platform device with id == 0.
> When the gpio devices are instantiated by a device tree, all have id ==
> -1 and so the handler was unset resulting in unusable gpio irqs on
> i.MX21 and i.MX27 (when using oftree).
>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Applied.
> I'm not sure this is material for stable because it never worked before.
Why take a chance. It goes to stable.
I'll have to explain to Torvalds why this is coming late.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-05 13:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-06 9:49 [PATCH] gpio/mxc: make irqs work for fsl,imx21-gpio devices Uwe Kleine-König
2012-06-07 2:21 ` Shawn Guo
2012-07-02 9:31 ` Sascha Hauer
2012-07-02 12:59 ` Linus Walleij
2012-07-04 23:38 ` Linus Walleij
2012-07-05 6:21 ` Sascha Hauer
2012-07-05 13:46 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.