linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: qcom: fix masking of pinmux functions
@ 2016-09-12  9:36 John Crispin
  2016-09-26  6:36 ` Stephen Boyd
  0 siblings, 1 reply; 7+ messages in thread
From: John Crispin @ 2016-09-12  9:36 UTC (permalink / raw)
  To: Linus Walleij, Stephen Boyd
  Cc: Bjorn Andersson, linux-gpio, linux-kernel, John Crispin

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

commit 47a01ee9a6c39fe1 ("pinctrl: qcom: Clear all function selection bits")

Signed-off-by: John Crispin <john@phrozen.org>
---
 drivers/pinctrl/qcom/pinctrl-msm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 51c42d7..775c883 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);
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-10-03 22:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12  9:36 [PATCH] pinctrl: qcom: fix masking of pinmux functions John Crispin
2016-09-26  6:36 ` Stephen Boyd
2016-09-26 15:52   ` Bjorn Andersson
2016-10-03 13:31     ` Linus Walleij
2016-10-03 14:24       ` John Crispin
2016-10-03 22:38         ` Linus Walleij
2016-10-03 20:53       ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).