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: 5290651 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B6160C11AC for ; Wed, 12 Nov 2014 16:01:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB790201CD for ; Wed, 12 Nov 2014 16:01:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AAB552017D for ; Wed, 12 Nov 2014 16:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbaKLQBe (ORCPT ); Wed, 12 Nov 2014 11:01:34 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:46896 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620AbaKLQBe (ORCPT ); Wed, 12 Nov 2014 11:01:34 -0500 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 , CC: Ulf Hansson , , , , , Grygorii Strashko 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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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); } /**