From patchwork Tue Feb 19 12:50:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: avinash philip X-Patchwork-Id: 2162891 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 79834DF24C for ; Tue, 19 Feb 2013 12:52:30 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U7meB-0004EW-Nu; Tue, 19 Feb 2013 12:50:11 +0000 Received: from arroyo.ext.ti.com ([192.94.94.40]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U7mdy-00049v-PT; Tue, 19 Feb 2013 12:49:59 +0000 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r1JCnoD2025166; Tue, 19 Feb 2013 06:49:51 -0600 Received: from DBDE70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id r1JCnnLr028161; Tue, 19 Feb 2013 18:19:50 +0530 (IST) Received: from dbdp32.itg.ti.com (172.24.170.251) by dbde70.ent.ti.com (172.24.170.148) with Microsoft SMTP Server id 14.1.323.3; Tue, 19 Feb 2013 18:19:49 +0530 Received: from ucmsshproxy.india.ext.ti.com (dbdp20.itg.ti.com [172.24.170.38]) by dbdp32.itg.ti.com (8.13.8/8.13.8) with SMTP id r1JCnn1b030397; Tue, 19 Feb 2013 18:19:49 +0530 Received: from symphony.india.ext.ti.com (unknown [192.168.247.13]) by ucmsshproxy.india.ext.ti.com (Postfix) with ESMTP id 32C8D158002; Tue, 19 Feb 2013 18:19:49 +0530 (IST) Received: from ubuntu-psp-linux.india.ext.ti.com (ubuntu-psp-linux [192.168.247.46]) by symphony.india.ext.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r1JCnmR10014; Tue, 19 Feb 2013 18:19:48 +0530 (IST) From: Philip Avinash To: , , , Subject: [PATCH v3 2/3] arm: gpmc: Low power transition support Date: Tue, 19 Feb 2013 18:20:18 +0530 Message-ID: <1361278219-23108-3-git-send-email-avinashphilip@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1361278219-23108-1-git-send-email-avinashphilip@ti.com> References: <1361278219-23108-1-git-send-email-avinashphilip@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130219_074958_935864_D1AE7925 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.6 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [192.94.94.40 listed in list.dnswl.org] 3.0 KHOP_BIG_TO_CC Sent to 10+ recipients instaed of Bcc or a list -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: afzal@ti.com, nsekhar@ti.com, linux-kernel@vger.kernel.org, hvaibhav@ti.com, gururaja.hebbar@ti.com, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org With GPMC converted to platform driver recently, adds low power transition support in driver itself. Signed-off-by: Philip Avinash --- Changes since v1: Module disable & enable added using pm_runtime support. arch/arm/mach-omap2/gpmc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index b1cd6c1..cc57988 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1361,9 +1361,29 @@ static __devexit int gpmc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int gpmc_suspend(struct platform_device *pdev, pm_message_t state) +{ + omap3_gpmc_save_context(); + pm_runtime_put_sync(&pdev->dev); + return 0; +} + +static int gpmc_resume(struct platform_device *pdev) +{ + pm_runtime_get_sync(&pdev->dev); + omap3_gpmc_restore_context(); + return 0; +} +#endif + static struct platform_driver gpmc_driver = { .probe = gpmc_probe, .remove = __devexit_p(gpmc_remove), +#ifdef CONFIG_PM + .suspend = gpmc_suspend, + .resume = gpmc_resume, +#endif .driver = { .name = DEVICE_NAME, .owner = THIS_MODULE,