diff options
author | Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> | 2016-09-07 21:48:14 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-09-12 08:25:52 -0400 |
commit | 430be10dd356fe9f1c142222fb9cc78feb00e86f (patch) | |
tree | 1e9da9bfb262b676c3bd9c11d703f1f905b325a3 /drivers/pinctrl | |
parent | 5803348cfcead8ac768e3c86bbe6f5afb5a10935 (diff) |
pinctrl: imx: accept gpio request/free from pinctrl
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>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 56fd88013850..47613201269a 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c | |||
@@ -315,7 +315,7 @@ static int imx_pmx_gpio_request_enable(struct pinctrl_dev *pctldev, | |||
315 | 315 | ||
316 | /* Currently implementation only for shared mux/conf register */ | 316 | /* Currently implementation only for shared mux/conf register */ |
317 | if (!(info->flags & SHARE_MUX_CONF_REG)) | 317 | if (!(info->flags & SHARE_MUX_CONF_REG)) |
318 | return -EINVAL; | 318 | return 0; |
319 | 319 | ||
320 | pin_reg = &info->pin_regs[offset]; | 320 | pin_reg = &info->pin_regs[offset]; |
321 | if (pin_reg->mux_reg == -1) | 321 | if (pin_reg->mux_reg == -1) |
@@ -380,7 +380,7 @@ static int imx_pmx_gpio_set_direction(struct pinctrl_dev *pctldev, | |||
380 | * They are part of the shared mux/conf register. | 380 | * They are part of the shared mux/conf register. |
381 | */ | 381 | */ |
382 | if (!(info->flags & SHARE_MUX_CONF_REG)) | 382 | if (!(info->flags & SHARE_MUX_CONF_REG)) |
383 | return -EINVAL; | 383 | return 0; |
384 | 384 | ||
385 | pin_reg = &info->pin_regs[offset]; | 385 | pin_reg = &info->pin_regs[offset]; |
386 | if (pin_reg->mux_reg == -1) | 386 | if (pin_reg->mux_reg == -1) |