[PATCH 1/2] gpio add interrupt support on pca953x

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Dec 23 09:16:25 EST 2009


On Wed, Dec 23, 2009 at 09:48:07PM +0800, Haojian Zhuang wrote:
> On Wed, Dec 23, 2009 at 9:29 PM, Mark Brown

> >> While I fully understand your point, I'm more worried about the
> >> correctness of the approach. I'm under the impression that the use of
> >> IRQ_NESTED_THREAD is mandatory if we're using a threaded handler.

> >> @Mark Brown: what is your take on this? Is it possible to use
> >> generic_handle_irq() from within a threaded handler?

> > ICBW but I believe you'll find that you get into trouble with lockdep if
> > try to do that - the TWL4030 drivers in current mainline jump through
> > some hoops in the client drivers as a result of this if you want to look
> > at some examples.  Once you're in a threaded IRQ you're in a slightly
> > different context and need to take account of that.

> So do you mean that we should disable IRQ in the threaded IRQ context?

I'm not sure exactly what makes you say that but if you're using the
genirq infrastructure then it should do the right thing for you here.
TWL4030 wasn't doing that (it predates genirq supporting I2C devices)
which was why it was running into trouble.



More information about the linux-arm-kernel mailing list