Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78456d6f authored by Linus Walleij's avatar Linus Walleij
Browse files

Revert "gpio: convince line to become input in irq helper"



This reverts commit 7e7c059c.

I was wrong about trying to do this, as it breaks the
orthogonality between gpiochips and irqchips.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent da17f8a1
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -1510,25 +1510,6 @@ static int gpiochip_irq_reqres(struct irq_data *d)
	if (!try_module_get(chip->gpiodev->owner))
		return -ENODEV;

	/*
	 * If it is possible to switch this GPIO to an input
	 * this is a good time to do it.
	 */
	if (chip->direction_input) {
		struct gpio_desc *desc;
		int ret;

		desc = gpiochip_get_desc(chip, d->hwirq);
		if (IS_ERR(desc))
			return PTR_ERR(desc);

	        ret = chip->direction_input(chip, d->hwirq);
		if (ret)
			return ret;

		clear_bit(FLAG_IS_OUT, &desc->flags);
	}

	if (gpiochip_lock_as_irq(chip, d->hwirq)) {
		chip_err(chip,
			"unable to lock HW IRQ %lu for IRQ\n",