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

Commit 9e238e38 authored by Linus Walleij's avatar Linus Walleij
Browse files

Revert "gpiolib: request the gpio before querying its direction"



This reverts commit 108d23e3.
It turns out this causes a regression on the OMAP, Marvell
and Renesas.

Reported-by: default avatarTony Lindgren <tony@atomide.com>
Reported-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: default avatarJacopo Mondi <jacopo@jmondi.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1253baaa
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -1221,14 +1221,6 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)
		struct gpio_desc *desc = &gdev->descs[i];

		desc->gdev = gdev;

		if (chip->request) {
			status = chip->request(chip, i);
			if (status < 0)
				/* The GPIO is unavailable, so skip it */
				continue;
		}

		/*
		 * REVISIT: most hardware initializes GPIOs as inputs
		 * (often with pullups enabled) so power usage is
@@ -1254,9 +1246,6 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)
			 */
			set_bit(FLAG_IS_OUT, &desc->flags);
		}

		if (chip->free)
			chip->free(chip, i);
	}

#ifdef CONFIG_PINCTRL