On 08/04/13 14:44, Ulf Hansson wrote:
> From: Ulf Hansson <[email protected]>
>
> 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 <[email protected]>
> Acked-by: Maya Erez <[email protected]>
> Acked-by: Arnd Bergmann <[email protected]>
> Acked-by: Kevin Liu <[email protected]>
> ---
> 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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html