aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-09-12 11:36:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-31 05:02:14 -0600
commitcab7ff65144217d4191091ea1745aa24aa1ebac2 (patch)
tree58e18bd71f858adcb44ae2ff0bd3a1d231d181bc
parent4cf6e0bbccca0627e146b0ac83c2f6e0c041b6c8 (diff)
downloadlinux-yocto-4.8-cab7ff65144217d4191091ea1745aa24aa1ebac2.tar.gz
linux-yocto-4.8-cab7ff65144217d4191091ea1745aa24aa1ebac2.tar.bz2
linux-yocto-4.8-cab7ff65144217d4191091ea1745aa24aa1ebac2.zip
pinctrl: qcom: fix masking of pinmux functions
commit 6bcf3f63394b9c4f133e4499349d786d7f531473 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/pinctrl/qcom/pinctrl-msm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 51c42d746883..775c88303017 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -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);