* [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ
@ 2013-10-11 9:32 Linus Walleij
2013-10-11 19:17 ` Stephen Warren
0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2013-10-11 9:32 UTC (permalink / raw)
To: linux-gpio
Cc: Alexandre Courbot, Linus Walleij, Enric Balletbo i Serra,
Grant Likely, Jean-Christophe PLAGNIOL-VILLARD, Santosh Shilimkar,
Stephen Warren, Javier Martinez Canillas
When an IRQ is started on a GPIO line, mark this GPIO as IRQ in
the gpiolib so we can keep track of the usage centrally.
Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/pinctrl-nomadik.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index d7c3ae3..7111c3b 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -634,6 +634,10 @@ static unsigned int nmk_gpio_irq_startup(struct irq_data *d)
{
struct nmk_gpio_chip *nmk_chip = irq_data_get_irq_chip_data(d);
+ if (gpio_lock_as_irq(&nmk_chip->chip, d->hwirq))
+ dev_err(nmk_chip->chip.dev,
+ "unable to lock HW IRQ %lu for IRQ\n",
+ d->hwirq);
clk_enable(nmk_chip->clk);
nmk_gpio_irq_unmask(d);
return 0;
@@ -645,6 +649,7 @@ static void nmk_gpio_irq_shutdown(struct irq_data *d)
nmk_gpio_irq_mask(d);
clk_disable(nmk_chip->clk);
+ gpio_unlock_as_irq(&nmk_chip->chip, d->hwirq);
}
static struct irq_chip nmk_gpio_irq_chip = {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ
2013-10-11 9:32 [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ Linus Walleij
@ 2013-10-11 19:17 ` Stephen Warren
2013-10-11 19:32 ` Javier Martinez Canillas
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Stephen Warren @ 2013-10-11 19:17 UTC (permalink / raw)
To: Linus Walleij, linux-gpio
Cc: Alexandre Courbot, Enric Balletbo i Serra, Grant Likely,
Jean-Christophe PLAGNIOL-VILLARD, Santosh Shilimkar,
Javier Martinez Canillas
On 10/11/2013 03:32 AM, Linus Walleij wrote:
> When an IRQ is started on a GPIO line, mark this GPIO as IRQ in
> the gpiolib so we can keep track of the usage centrally.
Are you planning on converting all GPIO+IRQ drivers, or should others
port this fix?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ
2013-10-11 19:17 ` Stephen Warren
@ 2013-10-11 19:32 ` Javier Martinez Canillas
2013-10-12 6:03 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-14 8:13 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2013-10-11 19:32 UTC (permalink / raw)
To: Stephen Warren
Cc: Linus Walleij, linux-gpio@vger.kernel.org, Alexandre Courbot,
Enric Balletbo i Serra, Grant Likely,
Jean-Christophe PLAGNIOL-VILLARD, Santosh Shilimkar
> On 11/10/2013, at 21:17, Stephen Warren <swarren@wwwdotorg.org> wrote:
>
>> On 10/11/2013 03:32 AM, Linus Walleij wrote:
>> When an IRQ is started on a GPIO line, mark this GPIO as IRQ in
>> the gpiolib so we can keep track of the usage centrally.
>
> Are you planning on converting all GPIO+IRQ drivers, or should others
> port this fix?
FWIW I have already a patch to convert gpio-omap to use this API instead of custom code and will post it as soon as Linus' patch is merged on one of his branches.
Best regards,
Javier
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ
2013-10-11 19:17 ` Stephen Warren
2013-10-11 19:32 ` Javier Martinez Canillas
@ 2013-10-12 6:03 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-14 8:13 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-10-12 6:03 UTC (permalink / raw)
To: Stephen Warren
Cc: Linus Walleij, linux-gpio, Alexandre Courbot,
Enric Balletbo i Serra, Grant Likely, Santosh Shilimkar,
Javier Martinez Canillas
On 13:17 Fri 11 Oct , Stephen Warren wrote:
> On 10/11/2013 03:32 AM, Linus Walleij wrote:
> > When an IRQ is started on a GPIO line, mark this GPIO as IRQ in
> > the gpiolib so we can keep track of the usage centrally.
>
> Are you planning on converting all GPIO+IRQ drivers, or should others
> port this fix?
I plan to do so
I propose this at ELCE and more cleanup
Best Regards,
J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ
2013-10-11 19:17 ` Stephen Warren
2013-10-11 19:32 ` Javier Martinez Canillas
2013-10-12 6:03 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2013-10-14 8:13 ` Linus Walleij
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2013-10-14 8:13 UTC (permalink / raw)
To: Stephen Warren
Cc: linux-gpio@vger.kernel.org, Alexandre Courbot,
Enric Balletbo i Serra, Grant Likely,
Jean-Christophe PLAGNIOL-VILLARD, Santosh Shilimkar,
Javier Martinez Canillas
On Fri, Oct 11, 2013 at 9:17 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 10/11/2013 03:32 AM, Linus Walleij wrote:
>> When an IRQ is started on a GPIO line, mark this GPIO as IRQ in
>> the gpiolib so we can keep track of the usage centrally.
>
> Are you planning on converting all GPIO+IRQ drivers, or should others
> port this fix?
Hm I think I will post patches for "my" GPIO drivers that I can test, and
try to set a good example. If nothing happens I guess I have to go in and try
to enforce it.
A tested patch to gpio-tegra.c would be appreciated :-)
My "devel" branch should be out today for those who want a
baseline to test against.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-14 8:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 9:32 [PATCH 2/2] pinctrl: nomadik: mark GPIO lines used for IRQ Linus Walleij
2013-10-11 19:17 ` Stephen Warren
2013-10-11 19:32 ` Javier Martinez Canillas
2013-10-12 6:03 ` Jean-Christophe PLAGNIOL-VILLARD
2013-10-14 8:13 ` 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).