* [PATCH] gpio: omap: Fix GPIO numbering for deferred probe
@ 2015-09-03 17:31 Tony Lindgren
2015-09-04 10:00 ` Grygorii Strashko
2015-09-08 14:14 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Tony Lindgren @ 2015-09-03 17:31 UTC (permalink / raw)
To: linux-arm-kernel
If gpio-omap probe fails with -EPROBE_DEFER, the GPIO numbering
keeps increasing. Only increase the gpio count if gpiochip_add()
was successful as otherwise the numbers will increase for each
probe attempt.
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Javier Martinez Canillas <javier@dowhile0.org>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/gpio/gpio-omap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1095,7 +1095,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
} else {
bank->chip.label = "gpio";
bank->chip.base = gpio;
- gpio += bank->width;
}
bank->chip.ngpio = bank->width;
@@ -1105,6 +1104,9 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
return ret;
}
+ if (!bank->is_mpuio)
+ gpio += bank->width;
+
#ifdef CONFIG_ARCH_OMAP1
/*
* REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gpio: omap: Fix GPIO numbering for deferred probe
2015-09-03 17:31 [PATCH] gpio: omap: Fix GPIO numbering for deferred probe Tony Lindgren
@ 2015-09-04 10:00 ` Grygorii Strashko
2015-09-04 23:52 ` Tony Lindgren
2015-09-08 14:14 ` Linus Walleij
1 sibling, 1 reply; 4+ messages in thread
From: Grygorii Strashko @ 2015-09-04 10:00 UTC (permalink / raw)
To: linux-arm-kernel
On 09/03/2015 08:31 PM, Tony Lindgren wrote:
> If gpio-omap probe fails with -EPROBE_DEFER, the GPIO numbering
> keeps increasing. Only increase the gpio count if gpiochip_add()
> was successful as otherwise the numbers will increase for each
> probe attempt.
>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Javier Martinez Canillas <javier@dowhile0.org>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Santosh Shilimkar <ssantosh@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
> drivers/gpio/gpio-omap.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1095,7 +1095,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
> } else {
> bank->chip.label = "gpio";
> bank->chip.base = gpio;
> - gpio += bank->width;
> }
> bank->chip.ngpio = bank->width;
>
> @@ -1105,6 +1104,9 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
> return ret;
> }
>
> + if (!bank->is_mpuio)
> + gpio += bank->width;
> +
> #ifdef CONFIG_ARCH_OMAP1
> /*
> * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
With hope that only GPIO0 will be deferred, otherwise
there will be total mess in gpios enumeration ;)
--
regards,
-grygorii
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gpio: omap: Fix GPIO numbering for deferred probe
2015-09-04 10:00 ` Grygorii Strashko
@ 2015-09-04 23:52 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2015-09-04 23:52 UTC (permalink / raw)
To: linux-arm-kernel
* Grygorii Strashko <grygorii.strashko@ti.com> [150904 03:04]:
> On 09/03/2015 08:31 PM, Tony Lindgren wrote:
> >If gpio-omap probe fails with -EPROBE_DEFER, the GPIO numbering
> >keeps increasing. Only increase the gpio count if gpiochip_add()
> >was successful as otherwise the numbers will increase for each
> >probe attempt.
> >
> >Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> >Cc: Javier Martinez Canillas <javier@dowhile0.org>
> >Cc: Kevin Hilman <khilman@deeprootsystems.com>
> >Cc: Santosh Shilimkar <ssantosh@kernel.org>
> >Signed-off-by: Tony Lindgren <tony@atomide.com>
> >---
> > drivers/gpio/gpio-omap.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >--- a/drivers/gpio/gpio-omap.c
> >+++ b/drivers/gpio/gpio-omap.c
> >@@ -1095,7 +1095,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
> > } else {
> > bank->chip.label = "gpio";
> > bank->chip.base = gpio;
> >- gpio += bank->width;
> > }
> > bank->chip.ngpio = bank->width;
> >
> >@@ -1105,6 +1104,9 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
> > return ret;
> > }
> >
> >+ if (!bank->is_mpuio)
> >+ gpio += bank->width;
> >+
> > #ifdef CONFIG_ARCH_OMAP1
> > /*
> > * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
> >
>
> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
>
> With hope that only GPIO0 will be deferred, otherwise
> there will be total mess in gpios enumeration ;)
Heh nope :) If pinctrl currently ever causes deferred probe
things will get totally messed up.. Works fine after $subject
patch.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gpio: omap: Fix GPIO numbering for deferred probe
2015-09-03 17:31 [PATCH] gpio: omap: Fix GPIO numbering for deferred probe Tony Lindgren
2015-09-04 10:00 ` Grygorii Strashko
@ 2015-09-08 14:14 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-09-08 14:14 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 3, 2015 at 7:31 PM, Tony Lindgren <tony@atomide.com> wrote:
> If gpio-omap probe fails with -EPROBE_DEFER, the GPIO numbering
> keeps increasing. Only increase the gpio count if gpiochip_add()
> was successful as otherwise the numbers will increase for each
> probe attempt.
>
> Cc: Grygorii Strashko <grygorii.strashko@ti.com>
> Cc: Javier Martinez Canillas <javier@dowhile0.org>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Santosh Shilimkar <ssantosh@kernel.org>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
Patch applied with Grygorii's review tag.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-08 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03 17:31 [PATCH] gpio: omap: Fix GPIO numbering for deferred probe Tony Lindgren
2015-09-04 10:00 ` Grygorii Strashko
2015-09-04 23:52 ` Tony Lindgren
2015-09-08 14:14 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).