All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: Ulf Hansson <ulf.hansson@stericsson.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"eliad@wizery.com" <eliad@wizery.com>,
	"nico@fluxnic.net" <nico@fluxnic.net>
Subject: Re: [Query] mmc: core "MMC_PM_KEEP_POWER"
Date: Tue, 22 Nov 2011 10:50:38 -0500	[thread overview]
Message-ID: <87hb1w2m29.fsf@laptop.org> (raw)
In-Reply-To: <4ECBC0C1.7080904@stericsson.com> (Ulf Hansson's message of "Tue, 22 Nov 2011 16:33:21 +0100")

Hi Ulf,

On Tue, Nov 22 2011, Ulf Hansson wrote:
> Thanks for the quick reply! I understand the idea better now. Just a
> minor follow-up question..
>
> The power_restore function for sdio also uses this flag, which is a
> little bit strange I think.

Yeah, it's being used to detect whether we're in the middle of a powered
resume, and therefore shouldn't be trying to reinit the card.  Then the
value of MMC_PM_KEEP_POWER gets reset once the resume's finished.

> Especially since the mmc_power_off|up is always called no matter of
> the value of this flag.

Hm, I don't think that's true.

mmc_suspend_host() checks !mmc_card_keep_power(host) before mmc_power_off()
mmc_resume_host() checks !mmc_card_keep_power(host) before mmc_power_up()

static inline int mmc_card_keep_power(struct mmc_host *host)
{
        return host->pm_flags & MMC_PM_KEEP_POWER;
}

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

  reply	other threads:[~2011-11-22 15:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 13:29 [Query] mmc: core "MMC_PM_KEEP_POWER" Ulf Hansson
2011-11-22 13:44 ` Eliad Peller
2011-11-22 13:52   ` Nicolas Pitre
2011-11-22 13:53 ` Chris Ball
2011-11-22 15:33   ` Ulf Hansson
2011-11-22 15:50     ` Chris Ball [this message]
2011-11-23  8:53       ` Ulf Hansson

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=87hb1w2m29.fsf@laptop.org \
    --to=cjb@laptop.org \
    --cc=eliad@wizery.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=ulf.hansson@stericsson.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 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.