diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-05-25 10:56:03 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-05-30 09:42:03 +0200 |
commit | 9c10280d85c14a20751ab6c1185ad725172936d6 (patch) | |
tree | f72f8ad76edba5852dd72714dfd0bf8a5ac3bd8c /drivers/ipack | |
parent | gpio: lpc32xx: disable broken to_irq support (diff) | |
download | linux-9c10280d85c14a20751ab6c1185ad725172936d6.tar.xz linux-9c10280d85c14a20751ab6c1185ad725172936d6.zip |
gpio: flush direction status in gpiochip_lock_as_irq()
As irqchip and gpiochip functions are orthogonal, the IRQ
set-up or something else can have changed the direction of
the GPIO line from what the GPIO descriptor knows when we
get into gpiochip_lock_as_irq(). Make sure to re-read the
direction setting if we have the .get_direction() callback
enabled for the chip.
Else we get problems like this:
iio iio:device2: interrupts on the rising edge
gpio gpiochip2: (8012e080.gpio): gpiochip_lock_as_irq:
tried to flag a GPIO set as output for IRQ
gpio gpiochip2: (8012e080.gpio): unable to lock HW IRQ 0 for IRQ
genirq: Failed to request resources for l3g4200d-trigger
(irq 111) on irqchip nmk1-32-63
iio iio:device2: failed to request trigger IRQ.
st-gyro-i2c: probe of 2-0068 failed with error -22
Fixes: 72d320006177 ("gpio: set up initial state from .get_direction()")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/ipack')
0 files changed, 0 insertions, 0 deletions