aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch21
1 files changed, 14 insertions, 7 deletions
diff --git a/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch b/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
index 436f1aa532..61e1b282c7 100644
--- a/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
+++ b/target/linux/brcm63xx/patches-4.14/143-gpio-fix-device-tree-gpio-hogs-on-dual-role-gpio-pin.patch
@@ -68,18 +68,25 @@ Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
ret = gpiod_hog(desc, name, lflags, dflags);
if (ret < 0) {
of_node_put(np);
-@@ -499,7 +506,10 @@ int of_gpiochip_add(struct gpio_chip *ch
+@@ -499,12 +506,13 @@ int of_gpiochip_add(struct gpio_chip *ch
of_node_get(chip->of_node);
-- return of_gpiochip_scan_gpios(chip);
-+ if (!chip->request)
-+ status = of_gpiochip_scan_gpios(chip, 0, chip->ngpio);
-+
-+ return status;
+- status = of_gpiochip_scan_gpios(chip);
+- if (status) {
+- of_node_put(chip->of_node);
+- gpiochip_remove_pin_ranges(chip);
++ if (!chip->request) {
++ status = of_gpiochip_scan_gpios(chip);
++ if (status) {
++ of_node_put(chip->of_node);
++ gpiochip_remove_pin_ranges(chip);
++ }
+ }
+-
+ return status;
}
- void of_gpiochip_remove(struct gpio_chip *chip)
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1938,7 +1938,8 @@ int gpiochip_add_pingroup_range(struct g