mmc: core: Enable runtime PM management of host devices
Currently those host drivers which have deployed runtime PM, deals with
the runtime PM reference counting entirely by themselves.
Since host drivers don't know when the core will send the next request
through some of the host_ops callbacks, they need to handle runtime PM
get/put between each an every request.
In quite many cases this has some negative effects, since it leads to a
high frequency of scheduled runtime PM suspend operations. That due to
the runtime PM reference count will normally reach zero in-between
every request.
We can decrease that frequency, by enabling the core to deal with
runtime PM reference counting of the host device. Since the core often
knows that it will send a seqeunce of requests, it makes sense for it
to keep a runtime PM reference count during these periods.
More exactly, let's increase the runtime PM reference count by invoking
pm_runtime_get_sync() from __mmc_claim_host(). Restore that action by
invoking pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend()
in mmc_release_host(). In this way a runtime PM reference count will be
kept during the complete cycle of a claim -> release host.
Signed-off-by: Ulf Hansson <email address hidden>
Acked-by: Adrian Hunter <email address hidden>
Acked-by: Konstantin Dorfman <email address hidden>
The commit fixes the issue
commit 9250aea76bfcbf4 c2a7868e5566281 bf2bb7af27
Author: Ulf Hansson <email address hidden>
Date: Fri Mar 27 12:15:15 2015 +0100
mmc: core: Enable runtime PM management of host devices
Currently those host drivers which have deployed runtime PM, deals with
the runtime PM reference counting entirely by themselves.
Since host drivers don't know when the core will send the next request
through some of the host_ops callbacks, they need to handle runtime PM
get/put between each an every request.
In quite many cases this has some negative effects, since it leads to a
high frequency of scheduled runtime PM suspend operations. That due to
the runtime PM reference count will normally reach zero in-between
every request.
We can decrease that frequency, by enabling the core to deal with
runtime PM reference counting of the host device. Since the core often
knows that it will send a seqeunce of requests, it makes sense for it
to keep a runtime PM reference count during these periods.
More exactly, let's increase the runtime PM reference count by invoking runtime_ get_sync( ) from __mmc_claim_host(). Restore that action by mark_last_ busy() and pm_runtime_ put_autosuspend ()
pm_
invoking pm_runtime_
in mmc_release_host(). In this way a runtime PM reference count will be
kept during the complete cycle of a claim -> release host.
Signed-off-by: Ulf Hansson <email address hidden>
Acked-by: Adrian Hunter <email address hidden>
Acked-by: Konstantin Dorfman <email address hidden>