e3d23010b917a33b30784517b683a7811eba07e3
[openwrt/staging/luka.git] /
1 From 289685a9b369bda990c4f22bbc7659ad492e6dbb Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <stefan.wahren@i2se.com>
3 Date: Sun, 3 Feb 2019 14:02:34 +0100
4 Subject: [PATCH] pinctrl: bcm2835: Direct GPIO config changes to
5 generic pinctrl
6
7 commit b6e5531c0f80de2779c87d0235b4fde5310a83b5 upstream.
8
9 In order to support GPIO config changes direct these to the generic pinctrl.
10 This also requires an adjust of the return code for unsupported parameter
11 otherwise gpiod_configure_flags wont work as expected.
12
13 Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
14 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
15 ---
16 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19 --- a/drivers/pinctrl/bcm/pinctrl-bcm2835.c
20 +++ b/drivers/pinctrl/bcm/pinctrl-bcm2835.c
21 @@ -342,6 +342,7 @@ static const struct gpio_chip bcm2835_gp
22 .get = bcm2835_gpio_get,
23 .set = bcm2835_gpio_set,
24 .base = 0,
25 + .set_config = gpiochip_generic_config,
26 .ngpio = BCM2835_NUM_GPIOS,
27 .can_sleep = false,
28 };
29 @@ -960,7 +961,7 @@ static int bcm2835_pinconf_set(struct pi
30 break;
31
32 default:
33 - return -EINVAL;
34 + return -ENOTSUPP;
35
36 } /* switch param type */
37 } /* for each config */