[PATCH] i2c: qup: use pm runtime func to manage clk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux