diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-02-09 10:30:36 +0530 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-04-01 13:26:08 +0800 |
commit | f4dbbe50849e28cda3ccd92c34c17055e5b40650 (patch) | |
tree | 7e2d7afff391b1c041ede59309b424de61eac037 /drivers/base/power | |
parent | 1d8b05e8cad0fb5a9043719d41d61f801ffac013 (diff) |
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>
(cherry picked from commit 2174344765f472895c076d703c9cdc58215e1393)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'drivers/base/power')
-rw-r--r-- | drivers/base/power/opp/core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index 6b7c1fad908b..08f5c0f4d004 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 * |