diff options
author | Srinivas Ramana <sramana@codeaurora.org> | 2017-10-17 17:24:06 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-07-05 23:37:14 -0700 |
commit | 886e726260439a8b3b480cc7d4aa2a1c7265fca0 (patch) | |
tree | f7706e1573b69c7be0e82c8c860b407953c3d4b3 | |
parent | 0fe549f6b66cd6329fa4e7c0ca67a6eb6bae7336 (diff) |
pinctrl: qcom: Clear status bit on irq_unmask
This commits reverts the commit a6566710adaa ("pinctrl:
qcom: Don't clear status bit on irq_unmask").
Above change causes an unexpected wakeup on the gpios when the
interrupt is enabled. The gpio interrupt status bit is getting set
after the irq is disabled and causing an immediate interrupt after
enablling the irq. So, revert this change to avoid unexpected/spurious
wakeups.
The above change came in as part of the merge commit 3a75d7a94709
("Merge 4.4.59 into android-4.4")
Change-Id: Ie58116c8ac5c81bc007d2c4398f5edfcbf9988d6
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
-rw-r--r-- | drivers/pinctrl/qcom/pinctrl-msm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index c5a351e7bb4e..7b36cc4ad110 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2013, Sony Mobile Communications AB. - * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -602,6 +602,10 @@ static void msm_gpio_irq_unmask(struct irq_data *d) spin_lock_irqsave(&pctrl->lock, flags); + val = readl(pctrl->regs + g->intr_status_reg); + val &= ~BIT(g->intr_status_bit); + writel(val, pctrl->regs + g->intr_status_reg); + val = readl(pctrl->regs + g->intr_cfg_reg); val |= BIT(g->intr_enable_bit); writel(val, pctrl->regs + g->intr_cfg_reg); |