]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
pinctrl: imx: accept gpio request/free from pinctrl
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Thu, 8 Sep 2016 01:48:14 +0000 (04:48 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 12 Sep 2016 12:25:52 +0000 (14:25 +0200)
While only Freescale Vybrid SoC has settings of GPIO capabilities done
by iomux controller, it is only a matter of GPIO controller driver
implementation for the rest of Freescale/NXP SoCs from iMX series.

As a practical example on GPIO request a pad function should be
switched to GPIO, but because this requires updates to all particular
iMX pinctrl drivers, for simplicity at the moment add only a proper
connection between shared pinctrl-imx and pinctrl/pinmux core, namely
.gpio_request_enable/.gpio_disable_free/.gpio_set_direction callbacks
should return success to a caller. This change allows to progress by
adding request/free callbacks into gpio-mxc.c driver.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/freescale/pinctrl-imx.c

index 56fd88013850f874393eb1e6cb881aefee2397c3..47613201269af42dd3fff670c92008333bf0adf0 100644 (file)
@@ -315,7 +315,7 @@ static int imx_pmx_gpio_request_enable(struct pinctrl_dev *pctldev,
 
        /* Currently implementation only for shared mux/conf register */
        if (!(info->flags & SHARE_MUX_CONF_REG))
-               return -EINVAL;
+               return 0;
 
        pin_reg = &info->pin_regs[offset];
        if (pin_reg->mux_reg == -1)
@@ -380,7 +380,7 @@ static int imx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
         * They are part of the shared mux/conf register.
         */
        if (!(info->flags & SHARE_MUX_CONF_REG))
-               return -EINVAL;
+               return 0;
 
        pin_reg = &info->pin_regs[offset];
        if (pin_reg->mux_reg == -1)