Commit 407f5e39 authored by Stanimir Varbanov's avatar Stanimir Varbanov Committed by Linus Walleij

pinctrl: qcom: handle input-enable pinconf property

This enables support of 'input-enable' pinconf generic property in
the pinctrl driver.
Signed-off-by: default avatarStanimir Varbanov <svarbanov@mm-sol.com>
Acked-by: default avatarBjorn Andersson <bjorn.andersson@sonymobile.com>
Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 38d756af
...@@ -193,6 +193,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl, ...@@ -193,6 +193,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
*mask = 7; *mask = 7;
break; break;
case PIN_CONFIG_OUTPUT: case PIN_CONFIG_OUTPUT:
case PIN_CONFIG_INPUT_ENABLE:
*bit = g->oe_bit; *bit = g->oe_bit;
*mask = 1; *mask = 1;
break; break;
...@@ -260,6 +261,12 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev, ...@@ -260,6 +261,12 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
val = readl(pctrl->regs + g->io_reg); val = readl(pctrl->regs + g->io_reg);
arg = !!(val & BIT(g->in_bit)); arg = !!(val & BIT(g->in_bit));
break; break;
case PIN_CONFIG_INPUT_ENABLE:
/* Pin is output */
if (arg)
return -EINVAL;
arg = 1;
break;
default: default:
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -330,6 +337,10 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev, ...@@ -330,6 +337,10 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
/* enable output */ /* enable output */
arg = 1; arg = 1;
break; break;
case PIN_CONFIG_INPUT_ENABLE:
/* disable output */
arg = 0;
break;
default: default:
dev_err(pctrl->dev, "Unsupported config parameter: %x\n", dev_err(pctrl->dev, "Unsupported config parameter: %x\n",
param); param);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment