pinctrl: qcom: fix masking of pinmux functions

The following commit introduced a regression by not properly masking the
calculated value.

Fixes: 47a01ee9a6 ("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>
This commit is contained in:
John Crispin 2016-09-12 11:36:55 +02:00 committed by Linus Walleij
parent 8d0a0ac0ab
commit 6bcf3f6339
1 changed files with 1 additions and 1 deletions

View File

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