pinctrl: qcom-spmi-gpio: Fix output type configuration
authorIvan T. Ivanov <ivan.ivanov@linaro.org>
Thu, 9 Apr 2015 15:18:35 +0000 (18:18 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Apr 2015 12:51:11 +0000 (14:51 +0200)
GPIO output type configuration was incorrectly overwritten
by strength value. Fix this.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c

index b2d22218a2582f94b2c5d0274843fa0c2d3d7162..4b21aac43216169bae6ff8308388cd4d686df066 100644 (file)
@@ -417,7 +417,7 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
                return ret;
 
        val = pad->buffer_type << PMIC_GPIO_REG_OUT_TYPE_SHIFT;
-       val = pad->strength << PMIC_GPIO_REG_OUT_STRENGTH_SHIFT;
+       val |= pad->strength << PMIC_GPIO_REG_OUT_STRENGTH_SHIFT;
 
        ret = pmic_gpio_write(state, pad, PMIC_GPIO_REG_DIG_OUT_CTL, val);
        if (ret < 0)