diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-05-31 17:05:18 +0900 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-05-31 12:50:47 +0200 |
commit | 39ec9ace7afe3a35f78eb4beffd18ad34a1e0278 (patch) | |
tree | b40e10b3f70a0e5686e7b65955176f5ed2b235f4 /drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | |
parent | aa543888ca8c033a7f06499b93cdfec84ad6ab27 (diff) | |
download | linux-39ec9ace7afe3a35f78eb4beffd18ad34a1e0278.tar.bz2 |
pinctrl: uniphier: support pin configuration for dedicated pins
PH1-LD4 and PH1-sLD8 SoCs have pins that support pin configuration
(pin biasing, drive strength control), but not pin-muxing.
Allow to fill the mux value table with -1 for those pins; pins with
mux value -1 will be skipped in the pin-mux set function. The mux
value type should be changed from "unsigned" to "int" in order to
accommodate -1 as a special case.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/uniphier/pinctrl-uniphier-core.c')
-rw-r--r-- | drivers/pinctrl/uniphier/pinctrl-uniphier-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c index d774a8e9c6a1..5bfcfa8ac234 100644 --- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c +++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c @@ -551,7 +551,7 @@ static int uniphier_pmx_get_function_groups(struct pinctrl_dev *pctldev, } static int uniphier_pmx_set_one_mux(struct pinctrl_dev *pctldev, unsigned pin, - unsigned muxval) + int muxval) { struct uniphier_pinctrl_priv *priv = pinctrl_dev_get_drvdata(pctldev); unsigned int mux_bits, reg_stride, reg, reg_end, shift, mask; @@ -564,6 +564,9 @@ static int uniphier_pmx_set_one_mux(struct pinctrl_dev *pctldev, unsigned pin, if (ret) return ret; + if (muxval < 0) + return 0; /* dedicated pin; nothing to do for pin-mux */ + if (priv->socdata->caps & UNIPHIER_PINCTRL_CAPS_DBGMUX_SEPARATE) { /* * Mode reg_offset bit_position |