From patchwork Mon Sep 27 13:24:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peppe CAVALLARO X-Patchwork-Id: 212342 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8RDOxYq021832 for ; Mon, 27 Sep 2010 13:24:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759147Ab0I0NY6 (ORCPT ); Mon, 27 Sep 2010 09:24:58 -0400 Received: from eu1sys200aog112.obsmtp.com ([207.126.144.133]:34622 "EHLO eu1sys200aog112.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756013Ab0I0NY6 (ORCPT ); Mon, 27 Sep 2010 09:24:58 -0400 Received: from source ([167.4.1.35]) (using TLSv1) by eu1sys200aob112.postini.com ([207.126.147.11]) with SMTP ID DSNKTKCbJhc3/li5Stzn2S0vjMseufQvZnTS@postini.com; Mon, 27 Sep 2010 13:24:56 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.80.115]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id 25CE6E4; Mon, 27 Sep 2010 13:21:36 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas5.st.com [10.75.90.71]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 745BB26A; Mon, 27 Sep 2010 13:24:51 +0000 (GMT) Received: from SAFEX1MAIL3.st.com ([10.75.90.7]) by Safex1hubcas5.st.com ([10.75.90.71]) with mapi; Mon, 27 Sep 2010 15:24:07 +0200 From: Peppe CAVALLARO To: Wolfram Sang Cc: "linux-mmc@vger.kernel.org" Date: Mon, 27 Sep 2010 15:24:02 +0200 Subject: Re: [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver Thread-Topic: [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver Thread-Index: ActeR0La4IyHpiKFSKqBoLhVX117Vg== Message-ID: <4CA09AF2.2030809@st.com> References: <1285233266-5039-1-git-send-email-peppe.cavallaro@st.com> <20100927103722.GC2664@pengutronix.de> <4CA094D7.7070101@st.com> In-Reply-To: <4CA094D7.7070101@st.com> Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Sep 2010 13:24:59 +0000 (UTC) From 847f635d0824c88f6575d86f5e9f50283883cd60 Mon Sep 17 00:00:00 2001 From: Giuseppe Cavallaro Date: Thu, 23 Sep 2010 10:13:00 +0200 Subject: [PATCH (mmc-next)] mmc: add suspend/resume in the sdhci-pltfm driver (V2) Signed-off-by: Giuseppe Cavallaro --- drivers/mmc/host/sdhci-pltfm.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index e045e3c..c43f954 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -165,6 +165,27 @@ static const struct platform_device_id sdhci_pltfm_ids[] = { }; MODULE_DEVICE_TABLE(platform, sdhci_pltfm_ids); +#ifdef CONFIG_PM +static int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t pm) +{ + struct sdhci_host *host = platform_get_drvdata(dev); + + sdhci_suspend_host(host, pm); + return 0; +} + +static int sdhci_pltfm_resume(struct platform_device *dev) +{ + struct sdhci_host *host = platform_get_drvdata(dev); + + sdhci_resume_host(host); + return 0; +} +#else +#define sdhci_pltfm_suspend NULL +#define sdhci_pltfm_resume NULL +#endif + static struct platform_driver sdhci_pltfm_driver = { .driver = { .name = "sdhci", @@ -173,6 +194,8 @@ static struct platform_driver sdhci_pltfm_driver = { .probe = sdhci_pltfm_probe, .remove = __devexit_p(sdhci_pltfm_remove), .id_table = sdhci_pltfm_ids, + .suspend = sdhci_pltfm_suspend, + .resume = sdhci_pltfm_resume, }; /*****************************************************************************\ -- 1.5.5.6