Skip to content

Commit

Permalink
Revert "gpiolib: request the gpio before querying its direction"
Browse files Browse the repository at this point in the history
This reverts commit 108d23e.
It turns out this causes a regression on the OMAP, Marvell
and Renesas.

Reported-by: Tony Lindgren <tony@atomide.com>
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Aug 31, 2017
1 parent 1253baa commit 9e238e3
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9e238e3

Please sign in to comment.