]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
pinctrl: bcm2835: Direct GPIO config changes to generic pinctrl
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 3 Feb 2019 13:02:34 +0000 (14:02 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 8 Feb 2019 12:13:01 +0000 (13:13 +0100)
In order to support GPIO config changes direct these to the generic pinctrl.
This also requires an adjust of the return code for unsupported parameter
otherwise gpiod_configure_flags wont work as expected.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/bcm/pinctrl-bcm2835.c

index 19eb4fd1ed4cc0eed460984d32baae2941a75941..183d1ffe6a75de6f6f205c17b88bc15db4fd23a8 100644 (file)
@@ -341,6 +341,7 @@ static const struct gpio_chip bcm2835_gpio_chip = {
        .get_direction = bcm2835_gpio_get_direction,
        .get = bcm2835_gpio_get,
        .set = bcm2835_gpio_set,
+       .set_config = gpiochip_generic_config,
        .base = -1,
        .ngpio = BCM2835_NUM_GPIOS,
        .can_sleep = false,
@@ -960,7 +961,7 @@ static int bcm2835_pinconf_set(struct pinctrl_dev *pctldev,
                        break;
 
                default:
-                       return -EINVAL;
+                       return -ENOTSUPP;
 
                } /* switch param type */
        } /* for each config */