From patchwork Wed Jun 1 00:04:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 834332 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p5104xGq024120 for ; Wed, 1 Jun 2011 00:04:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758527Ab1FAAE6 (ORCPT ); Tue, 31 May 2011 20:04:58 -0400 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]:37352 "EHLO na3sys009aog110.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758505Ab1FAAE6 (ORCPT ); Tue, 31 May 2011 20:04:58 -0400 Received: from mail-pz0-f46.google.com ([209.85.210.46]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKTeWCKeKdLzrUf93F0ImBE/0/3E7rqD4D@postini.com; Tue, 31 May 2011 17:04:58 PDT Received: by pzk9 with SMTP id 9so2258493pzk.19 for ; Tue, 31 May 2011 17:04:56 -0700 (PDT) Received: by 10.142.151.4 with SMTP id y4mr1481815wfd.133.1306886696523; Tue, 31 May 2011 17:04:56 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id k20sm303081wfh.8.2011.05.31.17.04.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2011 17:04:55 -0700 (PDT) From: Kevin Hilman To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Paul Walmsely Subject: [PATCH] OMAP: PM: omap_device: fix device power domain callbacks Date: Tue, 31 May 2011 17:04:54 -0700 Message-Id: <1306886694-11092-1-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.4 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 (demeter2.kernel.org [140.211.167.43]); Wed, 01 Jun 2011 00:04:59 +0000 (UTC) After commit 4d27e9dcff00a6425d779b065ec8892e4f391661 (PM: Make power domain callbacks take precedence over subsystem ones), the power domain callbacks need to call the driver callbacks instead of relying on the default subsystem (in this case, platform_bus) to handle the driver callbacks. Validated on 3430/n900, 3530/Overo. Signed-off-by: Kevin Hilman --- Will be queued in my for_3.0/pm-fixes branch unless there are objections. arch/arm/plat-omap/omap_device.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index a37b8eb..49fc0df 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -84,6 +84,7 @@ #include #include #include +#include #include #include @@ -539,20 +540,34 @@ int omap_early_device_register(struct omap_device *od) static int _od_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); + int ret; + + ret = pm_generic_runtime_suspend(dev); + + if (!ret) + omap_device_idle(pdev); + + return ret; +} - return omap_device_idle(pdev); +static int _od_runtime_idle(struct device *dev) +{ + return pm_generic_runtime_idle(dev); } static int _od_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); - return omap_device_enable(pdev); + omap_device_enable(pdev); + + return pm_generic_runtime_resume(dev); } static struct dev_power_domain omap_device_power_domain = { .ops = { .runtime_suspend = _od_runtime_suspend, + .runtime_idle = _od_runtime_idle, .runtime_resume = _od_runtime_resume, USE_PLATFORM_PM_SLEEP_OPS }