From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757991Ab3BSMuB (ORCPT ); Tue, 19 Feb 2013 07:50:01 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:47814 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300Ab3BSMt7 (ORCPT ); Tue, 19 Feb 2013 07:49:59 -0500 From: Philip Avinash To: , , , CC: , , , , , , , , Philip Avinash 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 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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, -- 1.7.9.5