Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-24 Thread Sricharan R
Hi, On Monday 23 September 2013 10:37 PM, Tony Lindgren wrote: * Javier Martinez Canillas javier.marti...@collabora.co.uk [130923 10:09]: On 09/23/2013 06:45 PM, Tony Lindgren wrote: Hmm does this still work for legacy platform data based drivers that are doing gpio_request() first? Yes it

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-24 Thread Javier Martinez Canillas
On 09/24/2013 09:39 AM, Sricharan R wrote: Hi, On Monday 23 September 2013 10:37 PM, Tony Lindgren wrote: * Javier Martinez Canillas javier.marti...@collabora.co.uk [130923 10:09]: On 09/23/2013 06:45 PM, Tony Lindgren wrote: Hmm does this still work for legacy platform data based drivers

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-24 Thread Sricharan R
On Tuesday 24 September 2013 01:24 PM, Javier Martinez Canillas wrote: On 09/24/2013 09:39 AM, Sricharan R wrote: Hi, On Monday 23 September 2013 10:37 PM, Tony Lindgren wrote: * Javier Martinez Canillas javier.marti...@collabora.co.uk [130923 10:09]: On 09/23/2013 06:45 PM, Tony Lindgren

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-24 Thread Tony Lindgren
* Javier Martinez Canillas javier.marti...@collabora.co.uk [130923 22:49]: On 09/23/2013 10:15 PM, Linus Walleij wrote: javier.marti...@collabora.co.uk wrote: - When a second caller calls omap_gpio_request() it should be OK as well, but only if the flags corresponds to the previously

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Stephen Warren
On 09/22/2013 08:40 AM, Javier Martinez Canillas wrote: To use a GPIO pin as an interrupt line, two previous configurations have to be made: a) Map the GPIO pin as an interrupt line into the Linux irq space b) Enable the GPIO bank and configure the GPIO direction as input Most GPIO/IRQ

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Tony Lindgren
* Javier Martinez Canillas javier.marti...@collabora.co.uk [130922 07:49]: --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -420,6 +420,29 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, return 0; } +static void _set_gpio_mode(struct gpio_bank

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Javier Martinez Canillas
On 09/23/2013 06:14 PM, Stephen Warren wrote: On 09/22/2013 08:40 AM, Javier Martinez Canillas wrote: To use a GPIO pin as an interrupt line, two previous configurations have to be made: a) Map the GPIO pin as an interrupt line into the Linux irq space b) Enable the GPIO bank and configure

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Javier Martinez Canillas
On 09/23/2013 06:45 PM, Tony Lindgren wrote: * Javier Martinez Canillas javier.marti...@collabora.co.uk [130922 07:49]: --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -420,6 +420,29 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, return 0; }

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Tony Lindgren
* Javier Martinez Canillas javier.marti...@collabora.co.uk [130923 10:09]: On 09/23/2013 06:45 PM, Tony Lindgren wrote: Hmm does this still work for legacy platform data based drivers that are doing gpio_request() first? Yes it still work when booting using board files. I tested on

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Santosh Shilimkar
Javier, On Monday 23 September 2013 01:07 PM, Tony Lindgren wrote: * Javier Martinez Canillas javier.marti...@collabora.co.uk [130923 10:09]: On 09/23/2013 06:45 PM, Tony Lindgren wrote: Hmm does this still work for legacy platform data based drivers that are doing gpio_request() first?

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Linus Walleij
On Sun, Sep 22, 2013 at 4:40 PM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: To use a GPIO pin as an interrupt line, two previous configurations have to be made: a) Map the GPIO pin as an interrupt line into the Linux irq space b) Enable the GPIO bank and configure the

Re: [RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-23 Thread Javier Martinez Canillas
On 09/23/2013 10:15 PM, Linus Walleij wrote: On Sun, Sep 22, 2013 at 4:40 PM, Javier Martinez Canillas javier.marti...@collabora.co.uk wrote: To use a GPIO pin as an interrupt line, two previous configurations have to be made: a) Map the GPIO pin as an interrupt line into the Linux irq

[RFC] gpio/omap: auto-setup a GPIO when used as an IRQ

2013-09-22 Thread Javier Martinez Canillas
To use a GPIO pin as an interrupt line, two previous configurations have to be made: a) Map the GPIO pin as an interrupt line into the Linux irq space b) Enable the GPIO bank and configure the GPIO direction as input Most GPIO/IRQ chip drivers just create a mapping for every single GPIO pin with