linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: nomadik: move runtime suspend of hw to _noirq
@ 2016-05-23 12:59 Linus Walleij
  2016-05-25 10:09 ` Ulf Hansson
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2016-05-23 12:59 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c; +Cc: Linus Walleij, Ulf Hansson

The runtime suspend of the hardware (declocking and pin control
resting) needs to happen in the *_noirq callbacks after all
hardware interrupts are disabled and we know there will be no
more I2C traffic in the system.

Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/i2c/busses/i2c-nomadik.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index bcd17e8cbcb4..c96a3e331bed 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -877,7 +877,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
 }
 
 #ifdef CONFIG_PM_SLEEP
-static int nmk_i2c_suspend_late(struct device *dev)
+static int nmk_i2c_suspend_noirq(struct device *dev)
 {
 	int ret;
 
@@ -889,7 +889,7 @@ static int nmk_i2c_suspend_late(struct device *dev)
 	return 0;
 }
 
-static int nmk_i2c_resume_early(struct device *dev)
+static int nmk_i2c_resume_noirq(struct device *dev)
 {
 	return pm_runtime_force_resume(dev);
 }
@@ -931,7 +931,8 @@ static int nmk_i2c_runtime_resume(struct device *dev)
 #endif
 
 static const struct dev_pm_ops nmk_i2c_pm = {
-	SET_LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_noirq,
+				      nmk_i2c_resume_noirq)
 	SET_RUNTIME_PM_OPS(nmk_i2c_runtime_suspend,
 			nmk_i2c_runtime_resume,
 			NULL)
-- 
2.4.11

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

end of thread, other threads:[~2016-07-22 14:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 12:59 [PATCH] i2c: nomadik: move runtime suspend of hw to _noirq Linus Walleij
2016-05-25 10:09 ` Ulf Hansson
2016-05-25 12:53   ` Linus Walleij
2016-06-19 17:12     ` Wolfram Sang
2016-07-14 13:40       ` Wolfram Sang
2016-07-22 14:20         ` Linus Walleij

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).