summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
diff options
context:
space:
mode:
authorIvan T. Ivanov <ivan.ivanov@linaro.org>2015-04-17 17:50:49 +0300
committerLinus Walleij <linus.walleij@linaro.org>2015-04-27 15:33:42 +0200
commitdc391502fdbf97a9cabdc58ba8c915175383f681 (patch)
tree3eb3c72dff70fe6a5eae6642c057c8d9005b8180 /drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
parenta526973e0291b245aefe12023a7f775f3c0e59a2 (diff)
pinctrl: qcom-spmi: Fix pin direction configuration
Pin direction configuration was incorrectly overwritten by output and function values in set_mux(). Fix this. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/qcom/pinctrl-spmi-gpio.c')
-rw-r--r--drivers/pinctrl/qcom/pinctrl-spmi-gpio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index b2d22218a258..de684ca93b5a 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -260,6 +260,7 @@ static int pmic_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned function,
val = 1;
}
+ val = val << PMIC_GPIO_REG_MODE_DIR_SHIFT;
val |= pad->function << PMIC_GPIO_REG_MODE_FUNCTION_SHIFT;
val |= pad->out_value & PMIC_GPIO_REG_MODE_VALUE_SHIFT;