Skip to content

Commit b8f9301

Browse files
andy-shevlinusw
authored andcommitted
Revert "gpiolib: of: Introduce hook for missing gpio-ranges"
This reverts commit 3550bba. No users for this one, revert it for good. The ->add_pin_ranges() can be used instead. Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Stefan Wahren <[email protected]> Tested-by: Florian Fainelli <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent bc96299 commit b8f9301

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

drivers/gpio/gpiolib-of.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,6 @@ static int of_gpiochip_add_pin_range(struct gpio_chip *chip)
981981
if (!np)
982982
return 0;
983983

984-
if (!of_property_read_bool(np, "gpio-ranges") &&
985-
chip->of_gpio_ranges_fallback) {
986-
return chip->of_gpio_ranges_fallback(chip, np);
987-
}
988-
989984
group_names = of_find_property(np, group_names_propname, NULL);
990985

991986
for (;; index++) {

include/linux/gpio/driver.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -525,18 +525,6 @@ struct gpio_chip {
525525
*/
526526
int (*of_xlate)(struct gpio_chip *gc,
527527
const struct of_phandle_args *gpiospec, u32 *flags);
528-
529-
/**
530-
* @of_gpio_ranges_fallback:
531-
*
532-
* Optional hook for the case that no gpio-ranges property is defined
533-
* within the device tree node "np" (usually DT before introduction
534-
* of gpio-ranges). So this callback is helpful to provide the
535-
* necessary backward compatibility for the pin ranges.
536-
*/
537-
int (*of_gpio_ranges_fallback)(struct gpio_chip *gc,
538-
struct device_node *np);
539-
540528
#endif /* CONFIG_OF_GPIO */
541529
};
542530

0 commit comments

Comments
 (0)