summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanimir Varbanov <svarbanov@mm-sol.com>2015-03-04 12:41:57 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-03-09 18:11:01 +0100
commit407f5e392f9c5b9c16178c5e6b2112234fdf9fad (patch)
tree329feb6629e8e7c0ce6e7aa9c8c0bacd192d90e0
parent38d756af7202c7cb1fde0c132076b0a6acd0d9d7 (diff)
downloadlwn-407f5e392f9c5b9c16178c5e6b2112234fdf9fad.tar.gz
lwn-407f5e392f9c5b9c16178c5e6b2112234fdf9fad.zip
pinctrl: qcom: handle input-enable pinconf property
This enables support of 'input-enable' pinconf generic property in the pinctrl driver. Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/qcom/pinctrl-msm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index d36e51172567..f3d800f796c2 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -193,6 +193,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
*mask = 7;
break;
case PIN_CONFIG_OUTPUT:
+ case PIN_CONFIG_INPUT_ENABLE:
*bit = g->oe_bit;
*mask = 1;
break;
@@ -260,6 +261,12 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
val = readl(pctrl->regs + g->io_reg);
arg = !!(val & BIT(g->in_bit));
break;
+ case PIN_CONFIG_INPUT_ENABLE:
+ /* Pin is output */
+ if (arg)
+ return -EINVAL;
+ arg = 1;
+ break;
default:
return -ENOTSUPP;
}
@@ -330,6 +337,10 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
/* enable output */
arg = 1;
break;
+ case PIN_CONFIG_INPUT_ENABLE:
+ /* disable output */
+ arg = 0;
+ break;
default:
dev_err(pctrl->dev, "Unsupported config parameter: %x\n",
param);