All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Ulf Hansson <ulf.hansson@stericsson.com>
Cc: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH V2 2/2] mmc: block: Enable runtime pm for mmc blkdevice
Date: Thu, 11 Apr 2013 11:31:56 +0300	[thread overview]
Message-ID: <516674FC.60704@intel.com> (raw)
In-Reply-To: <1365421497-4661-1-git-send-email-ulf.hansson@stericsson.com>

On 08/04/13 14:44, Ulf Hansson wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
> 
> Once the mmc blkdevice is being probed, runtime pm will be enabled.
> By using runtime autosuspend, the power save operations can be done
> when request inactivity occurs for a certain time. Right now the
> selected timeout value is set to 3 s.
> 
> Moreover, when the blk device is being suspended, we make sure the device
> will be runtime resumed. The reason for doing this is that we want the
> host suspend sequence to be unaware of any runtime power save operations,
> so it can just handle the suspend as the device is fully powered from a
> runtime perspective.
> 
> This patch is preparing to make it possible to move BKOPS handling into
> the runtime callbacks for the mmc bus_ops. Thus IDLE BKOPS can be
> accomplished.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> Acked-by: Maya Erez <merez@codeaurora.org>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Kevin Liu <kliu5@marvell.com>
> ---
>  drivers/mmc/card/block.c |   28 ++++++++++++++++++++++++++--
>  1 file changed, 26 insertions(+), 2 deletions(-)
> 

There are debugfs uses of the card also (e.g.mmc_dbg_card_status_get)
that will need get/put added.

There might be others.  Please check.

It might be worth adding helpers e.g. mmc_claim_card()/mmc_release_card
so that it is easy to see the places that the host is claimed but runtime pm
is not used.

void mmc_claim_card(card)
{
	pm_runtime_get_sync(&card->dev);
	mmc_claim_host(card->host);
}

void mmc_release_card(card)
{
	mmc_release_host(card->host);
	pm_runtime_mark_last_busy(&card->dev);
	pm_runtime_put_autosuspend(&card->dev);
}




  reply	other threads:[~2013-04-11  8:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 11:44 [PATCH V2 2/2] mmc: block: Enable runtime pm for mmc blkdevice Ulf Hansson
2013-04-11  8:31 ` Adrian Hunter [this message]
2013-04-11  9:40   ` Ulf Hansson
2013-04-11  9:58     ` Adrian Hunter
2013-04-11 10:14       ` Ulf Hansson
2013-04-11 12:28         ` Adrian Hunter
2013-04-11 14:17           ` Ulf Hansson
  -- strict thread matches above, loose matches on Subject: below --
2013-04-04 16:41 [PATCH V2 0/2] mmc: Use runtime pm for blkdevice Ulf Hansson
2013-04-04 16:41 ` [PATCH V2 2/2] mmc: block: Enable runtime pm for mmc blkdevice Ulf Hansson
2013-04-05 20:10   ` merez

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=516674FC.60704@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --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.