pinctrl: qcom: fix masking of pinmux functions
authorJohn Crispin <john@phrozen.org>
Mon, 12 Sep 2016 09:36:55 +0000 (11:36 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 3 Oct 2016 22:36:20 +0000 (00:36 +0200)
The following commit introduced a regression by not properly masking the
calculated value.

Fixes: 47a01ee9a6c3 ("pinctrl: qcom: Clear all function selection bits")
Signed-off-by: John Crispin <john@phrozen.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/pinctrl-msm.c

index 51c42d7468837f74344452e8b8ed269646393ef6..775c883030175320553bf087b64a545f634f86fe 100644 (file)
@@ -156,7 +156,7 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev,
        spin_lock_irqsave(&pctrl->lock, flags);
 
        val = readl(pctrl->regs + g->ctl_reg);
-       val &= mask;
+       val &= ~mask;
        val |= i << g->mux_bit;
        writel(val, pctrl->regs + g->ctl_reg);