Skip to content

Commit fc328a7

Browse files
mrjimenezbrgl
authored andcommitted
gpio: Revert regression in sysfs-gpio (gpiolib.c)
Some GPIO lines have stopped working after the patch commit 2ab73c6 ("gpio: Support GPIO controllers without pin-ranges") And this has supposedly been fixed in the following patches commit 89ad556 ("gpio: Avoid using pin ranges with !PINCTRL") commit 6dbbf84 ("gpiolib: Don't free if pin ranges are not defined") But an erratic behavior where some GPIO lines work while others do not work has been introduced. This patch reverts those changes so that the sysfs-gpio interface works properly again. Signed-off-by: Marcelo Roberto Jimenez <marcelo.jimenez@gmail.com> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
1 parent 5f84e73 commit fc328a7

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/gpio/gpiolib.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,11 +1701,6 @@ static inline void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gc)
17011701
*/
17021702
int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset)
17031703
{
1704-
#ifdef CONFIG_PINCTRL
1705-
if (list_empty(&gc->gpiodev->pin_ranges))
1706-
return 0;
1707-
#endif
1708-
17091704
return pinctrl_gpio_request(gc->gpiodev->base + offset);
17101705
}
17111706
EXPORT_SYMBOL_GPL(gpiochip_generic_request);
@@ -1717,11 +1712,6 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_request);
17171712
*/
17181713
void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset)
17191714
{
1720-
#ifdef CONFIG_PINCTRL
1721-
if (list_empty(&gc->gpiodev->pin_ranges))
1722-
return;
1723-
#endif
1724-
17251715
pinctrl_gpio_free(gc->gpiodev->base + offset);
17261716
}
17271717
EXPORT_SYMBOL_GPL(gpiochip_generic_free);

0 commit comments

Comments
 (0)