Skip to contentSkip to conversation

i2c: qup: use pm runtime func to manage clk

PATCH New Jun Nie 1 participant 1 message Aug 3, 2020

Subsystems (2)
lore
Share & tools
lore

Jun Nie

author
#0 lore raw

PATCH 1/1 i2c: qup: use pm runtime func to manage clk

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.

---
 drivers/i2c/busses/i2c-qup.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-qup.c +2 -4
index fbc04b60cfd1..b447fcbaa3f0 100644
@@ -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;
 }
Signature · 1 line
2.17.1