aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-07-06 08:40:08 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-07-06 08:40:08 -0400
commit78456d6ff815894e593675fc524cade9844501d5 (patch)
treee32e6532415fc39811f95e8ad08515c728dcaf95
parentda17f8a11378917a97019be33fed35893b7b7e1a (diff)
Revert "gpio: convince line to become input in irq helper"
This reverts commit 7e7c059cb50c7c72d5a393b2c34fc57de1b01b55. I was wrong about trying to do this, as it breaks the orthogonality between gpiochips and irqchips. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpiolib.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 5b0f4545f61b..2dff16915c11 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1510,25 +1510,6 @@ static int gpiochip_irq_reqres(struct irq_data *d)
1510 if (!try_module_get(chip->gpiodev->owner)) 1510 if (!try_module_get(chip->gpiodev->owner))
1511 return -ENODEV; 1511 return -ENODEV;
1512 1512
1513 /*
1514 * If it is possible to switch this GPIO to an input
1515 * this is a good time to do it.
1516 */
1517 if (chip->direction_input) {
1518 struct gpio_desc *desc;
1519 int ret;
1520
1521 desc = gpiochip_get_desc(chip, d->hwirq);
1522 if (IS_ERR(desc))
1523 return PTR_ERR(desc);
1524
1525 ret = chip->direction_input(chip, d->hwirq);
1526 if (ret)
1527 return ret;
1528
1529 clear_bit(FLAG_IS_OUT, &desc->flags);
1530 }
1531
1532 if (gpiochip_lock_as_irq(chip, d->hwirq)) { 1513 if (gpiochip_lock_as_irq(chip, d->hwirq)) {
1533 chip_err(chip, 1514 chip_err(chip,
1534 "unable to lock HW IRQ %lu for IRQ\n", 1515 "unable to lock HW IRQ %lu for IRQ\n",