Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-07 Thread David Brownell
o lazy-disable state This is an odd state, and confusion regularly comes up ... I've never been a fan of having the imperatively named disable_irq() act like a disable_irq_at a_random_later_time_ _but_nyet(). If one must have the latter function, clearer IMO to name it better and have

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-07 Thread Eduardo Valentin
Hello Kevin, On Thu, Jan 06, 2011 at 09:59:48AM -0800, ext Kevin Hilman wrote: Eduardo Valentin eduardo.valen...@nokia.com writes: On Wed, Jan 05, 2011 at 03:22:51PM -0800, ext Kevin Hilman wrote: Eduardo Valentin eduardo.valen...@nokia.com writes: Hello Russell, On Wed, Jan 05,

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-07 Thread Russell King - ARM Linux
On Fri, Jan 07, 2011 at 11:56:09AM +0200, Eduardo Valentin wrote: It is in wakeup-enable gpio. But the driver removes the wakeup flag from the gpio on its suspend function right after disabling the irq. disable_irq(gpio_irq); disable_irq_wake(gpio_irq); In this case, the device uses gpio

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-06 Thread Kevin Hilman
Eduardo Valentin eduardo.valen...@nokia.com writes: On Wed, Jan 05, 2011 at 03:22:51PM -0800, ext Kevin Hilman wrote: Eduardo Valentin eduardo.valen...@nokia.com writes: Hello Russell, On Wed, Jan 05, 2011 at 06:19:18PM +, Russell King wrote: On Wed, Jan 05, 2011 at 07:58:03PM

[PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-05 Thread Eduardo Valentin
Currently, if one calls disable_irq(gpio_irq), the irq won't get disabled. This is happening because the omap gpio code defines only a .mask callback. And the default_disable function is just a stub. The result is that, when someone calls disable_irq for an irq in a gpio line, it will be kept

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-05 Thread Russell King - ARM Linux
On Wed, Jan 05, 2011 at 07:58:03PM +0200, Eduardo Valentin wrote: Currently, if one calls disable_irq(gpio_irq), the irq won't get disabled. This is happening because the omap gpio code defines only a .mask callback. And the default_disable function is just a stub. The result is that, when

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-05 Thread Eduardo Valentin
Hello Russell, On Wed, Jan 05, 2011 at 06:19:18PM +, Russell King wrote: On Wed, Jan 05, 2011 at 07:58:03PM +0200, Eduardo Valentin wrote: Currently, if one calls disable_irq(gpio_irq), the irq won't get disabled. This is happening because the omap gpio code defines only a .mask

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-05 Thread Russell King - ARM Linux
On Wed, Jan 05, 2011 at 09:24:25PM +0200, Eduardo Valentin wrote: The way this works is that although it isn't disabled at that point, if it never triggers, then everything remains happy. However, if it does trigger, the genirq code will then mask the interrupt and won't call the handler.

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-05 Thread Kevin Hilman
Eduardo Valentin eduardo.valen...@nokia.com writes: Hello Russell, On Wed, Jan 05, 2011 at 06:19:18PM +, Russell King wrote: On Wed, Jan 05, 2011 at 07:58:03PM +0200, Eduardo Valentin wrote: Currently, if one calls disable_irq(gpio_irq), the irq won't get disabled. This is

Re: [PATCH 1/1] arm: omap: gpio: define .disable callback for gpio irq chip

2011-01-05 Thread Eduardo Valentin
On Wed, Jan 05, 2011 at 03:22:51PM -0800, ext Kevin Hilman wrote: Eduardo Valentin eduardo.valen...@nokia.com writes: Hello Russell, On Wed, Jan 05, 2011 at 06:19:18PM +, Russell King wrote: On Wed, Jan 05, 2011 at 07:58:03PM +0200, Eduardo Valentin wrote: Currently, if one calls