summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-02-09 10:30:36 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-10 01:11:53 +0100
commit2174344765f472895c076d703c9cdc58215e1393 (patch)
tree99977467b70018807760b157e134fbeb94f288ae /drivers/base
parent655c9df961751ce21466f6e97e8033932c27a675 (diff)
downloadblackbird-op-linux-2174344765f472895c076d703c9cdc58215e1393.tar.gz
blackbird-op-linux-2174344765f472895c076d703c9cdc58215e1393.zip
PM / OPP: Introduce dev_pm_opp_get_max_transition_latency()
In few use cases (like: cpufreq), it is desired to get the maximum latency for changing OPPs. Add support for that. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/opp/core.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index ffe2406af882..b0f5c72f0fc3 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -290,6 +290,23 @@ unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev)
EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_volt_latency);
/**
+ * dev_pm_opp_get_max_transition_latency() - Get max transition latency in
+ * nanoseconds
+ * @dev: device for which we do this operation
+ *
+ * Return: This function returns the max transition latency, in nanoseconds, to
+ * switch from one OPP to other.
+ *
+ * Locking: This function takes rcu_read_lock().
+ */
+unsigned long dev_pm_opp_get_max_transition_latency(struct device *dev)
+{
+ return dev_pm_opp_get_max_volt_latency(dev) +
+ dev_pm_opp_get_max_clock_latency(dev);
+}
+EXPORT_SYMBOL_GPL(dev_pm_opp_get_max_transition_latency);
+
+/**
* dev_pm_opp_get_suspend_opp() - Get suspend opp
* @dev: device for which we do this operation
*
OpenPOWER on IntegriCloud