Skip to content

Commit 9e238e3

Browse files
committed
Revert "gpiolib: request the gpio before querying its direction"
This reverts commit 108d23e. It turns out this causes a regression on the OMAP, Marvell and Renesas. Reported-by: Tony Lindgren <[email protected]> Reported-by: Thomas Petazzoni <[email protected]> Reported-by: Jacopo Mondi <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 1253baa commit 9e238e3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

drivers/gpio/gpiolib.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,14 +1221,6 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)
12211221
struct gpio_desc *desc = &gdev->descs[i];
12221222

12231223
desc->gdev = gdev;
1224-
1225-
if (chip->request) {
1226-
status = chip->request(chip, i);
1227-
if (status < 0)
1228-
/* The GPIO is unavailable, so skip it */
1229-
continue;
1230-
}
1231-
12321224
/*
12331225
* REVISIT: most hardware initializes GPIOs as inputs
12341226
* (often with pullups enabled) so power usage is
@@ -1254,9 +1246,6 @@ int gpiochip_add_data(struct gpio_chip *chip, void *data)
12541246
*/
12551247
set_bit(FLAG_IS_OUT, &desc->flags);
12561248
}
1257-
1258-
if (chip->free)
1259-
chip->free(chip, i);
12601249
}
12611250

12621251
#ifdef CONFIG_PINCTRL

0 commit comments

Comments
 (0)