]> git.karo-electronics.de Git - karo-tx-linux.git/commit
gpio: support threaded interrupts in irqchip helpers
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 9 Apr 2014 11:34:39 +0000 (13:34 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Apr 2014 08:22:50 +0000 (10:22 +0200)
commit855460274aefabb84ae1537f9b7b4fbf70f0092b
tree568d2e152c2ce47a6aa66dfaf85b8081895eab34
parent3f75fb26967836877c4d93b2b72da521d1e34ae4
gpio: support threaded interrupts in irqchip helpers

Some off-chip GPIO expanders need to be communicated by I2C or
SPI traffic, but may still support IRQs. By the sleeping nature
of such buses, such IRQ handlers need to be threaded. Support
such handlers in the gpiochip irqchip helpers by flagging IRQs
as threaded if the .can_sleep property of the gpiochip is
true.

Helpfully deny registration of chained IRQ handlers if the
.can_sleep property is set, as such chips will invariably need
a nested handler rather than a chained handler.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h