From: Peppe CAVALLARO <peppe.cavallaro@st.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver
Date: Mon, 27 Sep 2010 15:24:02 +0200 [thread overview]
Message-ID: <4CA09AF2.2030809@st.com> (raw)
In-Reply-To: <4CA094D7.7070101@st.com>
[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]
On 09/27/2010 02:57 PM, Peppe CAVALLARO wrote:
> On 09/27/2010 12:37 PM, Wolfram Sang wrote:
> > On Thu, Sep 23, 2010 at 11:14:24AM +0200, Giuseppe CAVALLARO wrote:
> >> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> >
> > I'd prefer it the way sdhci-mv.c is doing it (just one #if-block and
> > returning the code from the sdhci_*-functions). Then it should be fine.
>
> Okay! I can rework it without any problems.
Hi Wolfram
attached the new patch:
Let me know if it's ok.
Best Regards,
Peppe
>
> Peppe
>
> >
> >> ---
> >> drivers/mmc/host/sdhci-pltfm.c | 22 ++++++++++++++++++++++
> >> 1 files changed, 22 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> >> index e045e3c..89ea64b 100644
> >> --- a/drivers/mmc/host/sdhci-pltfm.c
> >> +++ b/drivers/mmc/host/sdhci-pltfm.c
> >> @@ -165,6 +165,24 @@ 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;
> >> +}
> >> +#endif
> >> +
> >> static struct platform_driver sdhci_pltfm_driver = {
> >> .driver = {
> >> .name = "sdhci",
> >> @@ -173,6 +191,10 @@ static struct platform_driver sdhci_pltfm_driver = {
> >> .probe = sdhci_pltfm_probe,
> >> .remove = __devexit_p(sdhci_pltfm_remove),
> >> .id_table = sdhci_pltfm_ids,
> >> +#ifdef CONFIG_PM
> >> + .suspend = sdhci_pltfm_suspend,
> >> + .resume = sdhci_pltfm_resume,
> >> +#endif
> >> };
> >>
> >> /*****************************************************************************\
> >> --
> >> 1.5.5.6
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-mmc-add-suspend-resume-in-the-sdhci-pltfm-driver-V.patch --]
[-- Type: text/x-patch; name="0001-mmc-add-suspend-resume-in-the-sdhci-pltfm-driver-V.patch", Size: 1680 bytes --]
From 847f635d0824c88f6575d86f5e9f50283883cd60 Mon Sep 17 00:00:00 2001
From: Giuseppe Cavallaro <peppe.cavallaro@st.com>
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 <peppe.cavallaro@st.com>
---
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
next prev parent reply other threads:[~2010-09-27 13:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 9:14 [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver Giuseppe CAVALLARO
2010-09-23 9:14 ` [PATCH (mmc-next) 2/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm d.d Giuseppe CAVALLARO
2010-09-23 9:14 ` [PATCH (mmc-next) 3/3] mmc: fix a warning when compile the sdhci d.d Giuseppe CAVALLARO
2010-09-27 10:54 ` Wolfram Sang
2010-09-27 12:57 ` Peppe CAVALLARO
2010-09-27 14:17 ` Wolfram Sang
2010-09-27 10:43 ` [PATCH (mmc-next) 2/3] mmc: split the sdhci.h to help platforms that uses shdci-pltfm d.d Wolfram Sang
2010-09-27 12:57 ` Peppe CAVALLARO
2010-09-27 14:13 ` Wolfram Sang
2010-09-27 14:20 ` Peppe CAVALLARO
2010-09-27 14:30 ` Wolfram Sang
2010-09-24 5:54 ` [PATCH (mmc-next) 1/3] mmc: add suspend/resume in the sdhci-pltfm driver Peppe CAVALLARO
2010-09-24 9:04 ` Wolfram Sang
2010-09-24 9:49 ` Peppe CAVALLARO
2010-09-27 10:37 ` Wolfram Sang
2010-09-27 12:57 ` Peppe CAVALLARO
2010-09-27 13:24 ` Peppe CAVALLARO [this message]
2010-09-27 14:15 ` Wolfram Sang
2010-09-27 14:25 ` Peppe CAVALLARO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CA09AF2.2030809@st.com \
--to=peppe.cavallaro@st.com \
--cc=linux-mmc@vger.kernel.org \
--cc=w.sang@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.