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

Commit c119fee0 authored by Linus Walleij's avatar Linus Walleij
Browse files

Revert "gpio/omap: auto request GPIO as input if used as IRQ via DT"



This reverts commit b4419e1a.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 27d470c1
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -1090,8 +1090,6 @@ static int omap_gpio_irq_map(struct irq_domain *d, unsigned int virq,
			     irq_hw_number_t hwirq)
{
	struct gpio_bank *bank = d->host_data;
	int gpio;
	int ret;

	if (!bank)
		return -EINVAL;
@@ -1106,22 +1104,6 @@ static int omap_gpio_irq_map(struct irq_domain *d, unsigned int virq,
		set_irq_flags(virq, IRQF_VALID);
	}

	/*
	 * REVISIT most GPIO IRQ chip drivers need to call
	 * gpio_request() before a GPIO line can be used as an
	 * IRQ. Ideally this should be handled by the IRQ core
	 * but until then this has to be done on a per driver
	 * basis. Remove this once this is managed by the core.
	 */
	if (bank->chip.of_node) {
		gpio = irq_to_gpio(bank, hwirq);
		ret = gpio_request_one(gpio, GPIOF_IN, NULL);
		if (ret) {
			dev_err(bank->dev, "Could not request GPIO%d\n", gpio);
			return ret;
		}
	}

	return 0;
}