From: Peppe CAVALLARO <peppe.cavallaro@st.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 2/5] mmc: do not clear the host->pm_flags when suspend
Date: Thu, 11 Nov 2010 08:24:24 +0100 [thread overview]
Message-ID: <4CDB9A28.5030408@st.com> (raw)
In-Reply-To: <AANLkTik1c0G2HNcXGboP8WA8vo9YvwYkUpM2=MGf-cLW@mail.gmail.com>
Hi Ohad,
On 11/10/2010 9:28 PM, Ohad Ben-Cohen wrote:
>
> Hi Giuseppe,
>
> On Wed, Nov 10, 2010 at 5:28 PM, Giuseppe CAVALLARO
> <peppe.cavallaro@st.com> wrote:
> > HC driver will be able to use the pm_flags to
> > undestand if the system can be woken-up by the driver.
> > So the mmc_suspend_host hasn't to reset this field
> > in the host structure.
> >
> > Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> > ---
> > drivers/mmc/core/core.c | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> > index 569e94d..6d2d6e4 100644
> > --- a/drivers/mmc/core/core.c
> > +++ b/drivers/mmc/core/core.c
> > @@ -1276,7 +1276,6 @@ int mmc_suspend_host(struct mmc_host *host)
> > mmc_claim_host(host);
> > mmc_detach_bus(host);
> > mmc_release_host(host);
> > - host->pm_flags = 0;
>
> This is elapsed because the card is removed at this point (e.g. SDIO
> returned -ENOSYS).
>
> Why would you want to use flags, set by a function driver of an SDIO
> card, that was just removed ?
>
The define MMC_PM_KEEP_POWER has been used to notify that
a device driver (e.g. sdhci-pltfm) want to wakeup the system.
It is set in the pm_flags. When the sdhci suspend is invoked, it can
call the mmc_suspend_host without free the interrupt if
MMC_PM_KEEP_POWER is set.
Then the sdhci_set_wakeup programs the HC to be able to wake up the system.
When the resume is invoked the pm_flags is used to avoid to request the irq.
For this reason I removed the inst "host->pm_flags = 0;" from the
mmc_suspend_host
function. Maybe I could not remove it but add a check if the driver
wants to wakeup
the system and the MMC_PM_KEEP_POWER is set. What do you think?
Thanks
Regards,
Peppe
>
>
> > err = 0;
> > }
> > }
> > --
> > 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
> >
>
next prev parent reply other threads:[~2010-11-11 7:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 15:28 [RFC] improve the SDHCI wakeup support Giuseppe CAVALLARO
2010-11-10 15:28 ` Giuseppe CAVALLARO
2010-11-10 15:28 ` [PATCH (1/5)] mmc: sdhci-pltfm calls the sdhci_alloc_host with pdev->dev Giuseppe CAVALLARO
2010-11-10 15:28 ` [PATCH 2/5] mmc: do not clear the host->pm_flags when suspend Giuseppe CAVALLARO
2010-11-10 15:28 ` [PATCH 3/5] mmc_sdhci: improve the wake-up support Giuseppe CAVALLARO
2010-11-10 15:28 ` [PATCH 4/5] mmc: sdhci-pci invokes the sdhci_enable_irq_wakeups with SDHCI_WAKE_ON_INT Giuseppe CAVALLARO
2010-11-10 15:28 ` [PATCH 5/5] mmc: sdhci-pltfm can wake up Giuseppe CAVALLARO
2010-11-10 20:28 ` [PATCH 2/5] mmc: do not clear the host->pm_flags when suspend Ohad Ben-Cohen
2010-11-11 7:24 ` Peppe CAVALLARO [this message]
2010-11-11 23:45 ` Ohad Ben-Cohen
2010-11-12 8:06 ` Peppe CAVALLARO
2010-11-12 4:37 ` Nicolas Pitre
2010-11-10 15:43 ` [PATCH (1/5)] mmc: sdhci-pltfm calls the sdhci_alloc_host with pdev->dev Wolfram Sang
2010-11-11 7:16 ` Peppe CAVALLARO
2010-11-11 7:48 ` Wolfram Sang
2010-11-11 10:58 ` Peppe CAVALLARO
2010-11-15 14:52 ` [RFC] improve the SDHCI wakeup support 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=4CDB9A28.5030408@st.com \
--to=peppe.cavallaro@st.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ohad@wizery.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox