From patchwork Tue Aug 23 15:01:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govindraj R X-Patchwork-Id: 1088802 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7NF2Jg6026280 for ; Tue, 23 Aug 2011 15:02:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755193Ab1HWPCS (ORCPT ); Tue, 23 Aug 2011 11:02:18 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:36886 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755132Ab1HWPCR (ORCPT ); Tue, 23 Aug 2011 11:02:17 -0400 Received: by bke11 with SMTP id 11so157966bke.19 for ; Tue, 23 Aug 2011 08:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=KuUYI75ezF2cSFG8HlkCekaiQ+6pXGRvUToHjC5RT2M=; b=jrbnEl6ya1KRX3yEJuXZY3W6hq+2USm+Ceb+1MgBh3RErbP0fToyGuz5tp3En1yTeq HWD3IrdwWYVRTCzM0Icmkie/TyOSsHYSj8znvJPkvXWjIsKTxjzaBsaNPhvMYkZqij6x 6eaCa52a/cCDd0jgQGHJA+ETavh3PLtYReqTo= Received: by 10.204.5.81 with SMTP id 17mr1605588bku.225.1314111735970; Tue, 23 Aug 2011 08:02:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.55.75 with HTTP; Tue, 23 Aug 2011 08:01:52 -0700 (PDT) In-Reply-To: <4E53B6FC.8030507@ti.com> References: <4E53B6FC.8030507@ti.com> From: Govindraj Date: Tue, 23 Aug 2011 20:31:52 +0530 Message-ID: Subject: Re: [POWER DOMAIN suspend callbacks] Observation. To: Santosh Cc: "Rafael J. Wysocki" , Kevin Hilman , Linux PM mailing list , linux-omap@vger.kernel.org, Govindraj R , "Sripathy, Vishwanath" , "Basak, Partha" Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 23 Aug 2011 15:02:19 +0000 (UTC) On Tue, Aug 23, 2011 at 7:49 PM, Santosh wrote: > Rafael, Kevin, > > On latest kernel( V3.1-rc1+), the subsystem(driver) suspend > callbacks are not getting called because power domain callbcaks > are populated. > > And as per commit 4d27e9dc{PM: Make power domain callbacks take > precedence over subsystem ones}, it's expected bahavior. > > Who is suppose to call the driver suspend callback? > Some drivers/subsystem would have state machine which needs to > be suspended. > > Is the power domain suspend callback, suppose to take care of > it ? If yes, then that seems to be missing for OMAP. > Looks like from _od_suspend_noirq -> pm_generic_suspend_noirq -> __pm_generic_call(dev, PM_EVENT_SUSPEND, true); --> [..] case PM_EVENT_SUSPEND: callback = noirq ? pm->suspend_noirq : pm->suspend; shouldn't we call pm_generic_suspend from _od_suspend_noirq rather than calling pm_generic_suspend_noirq? Since _noirq seems to call .suspend_noirq hook which most of the them have not populated. pm_generic_suspend* calls may fail to call legacy platform .suspend hooks? Looks like we need below change for driver .suspend hook to be called. --- Thanks, Govindraj.R -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b6b4097..c2a18ae 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -584,9 +584,9 @@ static int _od_suspend_noirq(struct device *dev) int ret; if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND) - return pm_generic_suspend_noirq(dev); + return pm_generic_suspend(dev); - ret = pm_generic_suspend_noirq(dev); + ret = pm_generic_suspend(dev); if (!ret && !pm_runtime_status_suspended(dev)) { if (pm_generic_runtime_suspend(dev) == 0) { @@ -604,7 +604,7 @@ static int _od_resume_noirq(struct device *dev) struct omap_device *od = to_omap_device(pdev); if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND) - return pm_generic_resume_noirq(dev); + return pm_generic_resume(dev); if ((od->flags & OMAP_DEVICE_SUSPENDED) && !pm_runtime_status_suspended(dev)) { @@ -613,7 +613,7 @@ static int _od_resume_noirq(struct device *dev) pm_generic_runtime_resume(dev); } - return pm_generic_resume_noirq(dev); + return pm_generic_resume(dev); } #endif