From patchwork Thu Mar 30 03:26:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 96218 Delivered-To: patches@linaro.org Received: by 10.140.89.233 with SMTP id v96csp48596qgd; Wed, 29 Mar 2017 20:26:25 -0700 (PDT) X-Received: by 10.99.157.6 with SMTP id i6mr3786306pgd.87.1490844385184; Wed, 29 Mar 2017 20:26:25 -0700 (PDT) Return-Path: Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com. [2607:f8b0:400e:c05::22e]) by mx.google.com with ESMTPS id 190si783622pfy.259.2017.03.29.20.26.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 20:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::22e as permitted sender) client-ip=2607:f8b0:400e:c05::22e; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::22e as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x22e.google.com with SMTP id g2so25417126pge.3 for ; Wed, 29 Mar 2017 20:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=X2h9CFp1KMr0Arl/vll3NJADNpw6tvf9pd1KfuxLmrE=; b=aHeAv6GL9/LR2hR0H/hbYmNdBQ4t8zLX5PP8FWmQ+gH60Xz4pkNG0FG81WvTT2AXcM UMeojI7wC6IL848phQBYsv6hkAXVMIxTY6Ha33WEzB3uG2U12zvqYAbmne8JM7Wht+dF mJXekdhNGJywc3OlfLcdx87PMshVeMQhPPwfs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=X2h9CFp1KMr0Arl/vll3NJADNpw6tvf9pd1KfuxLmrE=; b=RJbGsJPqk7NeHCmibj94kUu4SIQuveBYhZZ4qFhI5WMYRR/I9lJHf/JhJyoZxSIAzv HJkAwyl5q0AYMXAbObmgdbiwkTXIKHzYoMS6j4sxIiDAIHmBgYKwC/iMo0juJa6LhAN/ 1XqKeTqKcAiImx4XwUkdWyPN3uHjG9xyt/ETi6DAjnw41/79W0cKD93OKe3056QCVkcv p0WWqnmhvR6uMpn4psxsDpLfZhu1KTZ6CNLw4sXIOppMBL53UBvCOctztJ0PNbSAHOal Qvmaxf/eV6bLRMgdI4HuE4Fhin0584qpI5CkRWYXfNYXtceAW6bpug5vNnoAeNBZz6+C 2TsA== X-Gm-Message-State: AFeK/H3aFPdKUn/nJ1sPPzUgctHgGSg+gislG9UYnpwikpBHm9zEcr+XQvp37fo3/9GimXJ19B4= X-Received: by 10.98.67.89 with SMTP id q86mr3646021pfa.237.1490844384864; Wed, 29 Mar 2017 20:26:24 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id b80sm824862pfe.87.2017.03.29.20.26.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 20:26:23 -0700 (PDT) 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 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(-) -- 2.7.4 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) };