All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq
@ 2016-05-31 21:17 Tony Lindgren
  2016-06-02 12:27 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2016-05-31 21:17 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Haojian Zhuang, Grygorii Strashko, linux-gpio, linux-omap

With many repeated suspend resume cycles, the pin specific wakeirq
may not always work on omaps. This is because the write to enable the
pin interrupt may not have reached the device over the interconnect
before suspend happens.

Let's fix the issue with a flush of posted write with a readback.

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/pinctrl/pinctrl-single.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index cf9bafa..bfdf720 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1580,6 +1580,9 @@ static inline void pcs_irq_set(struct pcs_soc_data *pcs_soc,
 		else
 			mask &= ~soc_mask;
 		pcs->write(mask, pcswi->reg);
+
+		/* flush posted write */
+		mask = pcs->read(pcswi->reg);
 		raw_spin_unlock(&pcs->lock);
 	}
 
-- 
2.8.1


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

end of thread, other threads:[~2016-06-08  8:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 21:17 [PATCH] pinctrl: single: Fix missing flush of posted write for a wakeirq Tony Lindgren
2016-06-02 12:27 ` Linus Walleij
2016-06-02 15:19   ` Tony Lindgren
2016-06-08  8:05     ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.