pinctrl: sunxi: Declare set_config on the GPIO chip
authorMaxime Ripard <maxime.ripard@bootlin.com>
Thu, 14 Mar 2019 19:32:53 +0000 (20:32 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 4 Apr 2019 03:54:59 +0000 (10:54 +0700)
Our pin controller can configure the pins no matter how they are muxed, so
it makes sense to allow this for GPIOs as well.

Add the generic set_config function so that we can rely on the existing
pinctrl code we have.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sunxi/pinctrl-sunxi.c

index 96490dee62befe7b5d23877629a29cd6cb82a8ab..be04223591d46423327a2c871ef64fd1b1abea29 100644 (file)
@@ -1452,6 +1452,7 @@ int sunxi_pinctrl_init_with_variant(struct platform_device *pdev,
        pctl->chip->owner = THIS_MODULE;
        pctl->chip->request = gpiochip_generic_request;
        pctl->chip->free = gpiochip_generic_free;
+       pctl->chip->set_config = gpiochip_generic_config;
        pctl->chip->direction_input = sunxi_pinctrl_gpio_direction_input;
        pctl->chip->direction_output = sunxi_pinctrl_gpio_direction_output;
        pctl->chip->get = sunxi_pinctrl_gpio_get;