From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: [RFT][PATCH 0/2] i2c: designware: Runtime PM aware system sleep handling Date: Mon, 04 Sep 2017 01:05:57 +0200 Message-ID: <3023226.l5IfJK6GIc@aspire.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from cloudserver094114.home.net.pl ([79.96.170.134]:63445 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753111AbdICXZG (ORCPT ); Sun, 3 Sep 2017 19:25:06 -0400 Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-pm@vger.kernel.org, linux-i2c@vger.kernel.org Cc: Wolfram Sang , linux-acpi@vger.kernel.org, Kevin Hilman , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jisheng Zhang , John Stultz , Guodong Xu , Sumit Semwal , Haojian Zhuang , Johannes Stezenbach , Ulf Hansson Hi, The point here is to avoid runtime resuming i2c designware devices during system suspend in the driver's ->suspend callback in the case when the ACPI PM domain is not present. That will allow us to deal with the ACPI PM domain case going forward, among other things. The first patch cleans up the runtime PM handling in the i2c-designware-platdrv _probe() routine so as to make it enable runtime PM in all cases, but prevent the device from being runtime suspended via pm_runtime_forbid() if pm_disabled is set. The second one get rids of some ugly code and makes the PM callbacks of the driver handle runtime-suspended devices during system suspend/resume. Please test if you can and let me know if anything breaks. Thanks, Rafael