Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755522AbdC3D0e (ORCPT ); Wed, 29 Mar 2017 23:26:34 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:35190 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755293AbdC3D00 (ORCPT ); Wed, 29 Mar 2017 23:26:26 -0400 From: John Stultz To: lkml Cc: John Stultz , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Wolfram Sang , linux-i2c@vger.kernel.org Subject: [RESEND][PATCH v2] i2c: designwear: Fix clk warning on suspend/resume Date: Wed, 29 Mar 2017 20:26:17 -0700 Message-Id: <1490844377-32182-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1450 Lines: 35 On my HiKey board, I'm seeing clk warnings on suspend/resume, which seem to be caused by runtime pm suspending the device, then the same suspend hook being called again on suspend time. This patch fixes this by setting the SYSTEM_SLEEP_PM_OPS to using pm_runtime_force_suspend and pm_runtime_force_resume. Cc: Jarkko Nikula Cc: Andy Shevchenko Cc: Mika Westerberg Cc: Wolfram Sang Cc: linux-i2c@vger.kernel.org Suggested-by: Jarkko Nikula Signed-off-by: John Stultz --- v2: Switch to suggested fix by Jarkko. --- drivers/i2c/busses/i2c-designware-platdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 79c4b4e..286447c 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -382,7 +382,7 @@ static int dw_i2c_plat_resume(struct device *dev) static const struct dev_pm_ops dw_i2c_dev_pm_ops = { .prepare = dw_i2c_plat_prepare, .complete = dw_i2c_plat_complete, - SET_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) SET_RUNTIME_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume, NULL) }; -- 2.7.4