i2c: qup: use pm runtime func to manage clk
Subsystems (2)
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.
Signed-off-by Jun Nie <[email protected]>
--- drivers/i2c/busses/i2c-qup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-qup.c +2 -4
@@ -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