linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: qup: use pm runtime func to manage clk
@ 2020-08-03  8:08 Jun Nie
  0 siblings, 0 replies; only message in thread
From: Jun Nie @ 2020-08-03  8:08 UTC (permalink / raw)
  To: shawn.guo, agross, bjorn.andersson, linux-arm-msm; +Cc: Jun Nie

Use pm runtime callback to manage clock. Otherwise, clock is
enabled in resume without notifying pm rumetime core and result
no gating in next suspend.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 drivers/i2c/busses/i2c-qup.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index fbc04b60cfd1..b447fcbaa3f0 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1943,15 +1943,13 @@ static int qup_i2c_pm_resume_runtime(struct device *device)
 #ifdef CONFIG_PM_SLEEP
 static int qup_i2c_suspend(struct device *device)
 {
-	if (!pm_runtime_suspended(device))
-		return qup_i2c_pm_suspend_runtime(device);
+	pm_runtime_force_suspend(device);
 	return 0;
 }
 
 static int qup_i2c_resume(struct device *device)
 {
-	qup_i2c_pm_resume_runtime(device);
-	pm_runtime_mark_last_busy(device);
+	pm_runtime_force_resume(device);
 	pm_request_autosuspend(device);
 	return 0;
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-03  8:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03  8:08 [PATCH] i2c: qup: use pm runtime func to manage clk Jun Nie

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