From patchwork Wed Nov 12 16:00:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 5290681 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 39C539F440 for ; Wed, 12 Nov 2014 16:03:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA9B2201BB for ; Wed, 12 Nov 2014 16:03:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00A822017D for ; Wed, 12 Nov 2014 16:03:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XoaMJ-0004dw-7b; Wed, 12 Nov 2014 16:01:27 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XoaMF-0004Ug-Sa for linux-arm-kernel@lists.infradead.org; Wed, 12 Nov 2014 16:01:24 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id sACG0xqT014665; Wed, 12 Nov 2014 10:00:59 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sACG0xrl000895; Wed, 12 Nov 2014 10:00:59 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Wed, 12 Nov 2014 10:00:59 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id sACG0wvI005556; Wed, 12 Nov 2014 10:00:58 -0600 From: Grygorii Strashko To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Subject: [PATCH] PM / Domains: restore calling of .suspend/resume_noirq() callbacks Date: Wed, 12 Nov 2014 18:00:47 +0200 Message-ID: <1415808047-23455-1-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141112_080124_101286_147F511E X-CRM114-Status: UNSURE ( 8.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.6 (-----) Cc: Ulf Hansson , Grygorii Strashko , k.kozlowski@samsung.com, linux-kernel@vger.kernel.org, khilman@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now .suspend/resume_noirq() callbacks will not be called during system wide suspend/resume for devices which belongs to some GPD. It seems, that this change was accidently introduced by commit d23b9b00cdde ("PM / Domains: Rework system suspend callback routines (v2)"). This patch restores calling of .suspend/resume_noirq() callbacks for devices from GPD during system wide suspend/resume. Signed-off-by: Grygorii Strashko --- drivers/base/power/domain.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index fb83d4a..f8c70e6 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1014,6 +1014,7 @@ static int pm_genpd_suspend_late(struct device *dev) static int pm_genpd_suspend_noirq(struct device *dev) { struct generic_pm_domain *genpd; + int ret; dev_dbg(dev, "%s()\n", __func__); @@ -1021,8 +1022,14 @@ static int pm_genpd_suspend_noirq(struct device *dev) if (IS_ERR(genpd)) return -EINVAL; - if (genpd->suspend_power_off - || (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev))) + if (genpd->suspend_power_off) + return 0; + + ret = pm_generic_suspend_noirq(dev); + if (ret) + return ret; + + if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)) return 0; genpd_stop_dev(genpd, dev); @@ -1065,8 +1072,9 @@ static int pm_genpd_resume_noirq(struct device *dev) */ pm_genpd_sync_poweron(genpd); genpd->suspended_count--; + genpd_start_dev(genpd, dev); - return genpd_start_dev(genpd, dev); + return pm_generic_resume_noirq(dev); } /**