summaryrefslogtreecommitdiffstats
path: root/include/linux/devfreq.h
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2021-02-04 16:14:23 +0800
committerViresh Kumar <viresh.kumar@linaro.org>2021-02-04 16:36:28 +0530
commit26f9c7cc42a6dc036edf871544fd0e6b3a0601c1 (patch)
tree57c971b834230ed04a3d15e41d2aee94412d50b7 /include/linux/devfreq.h
parent7d8658ef65a4f891d0cff6340fa717b378384642 (diff)
downloadlinux-26f9c7cc42a6dc036edf871544fd0e6b3a0601c1.tar.bz2
PM / devfreq: Cache OPP table reference in devfreq
The OPP table can be used often in devfreq. Trying to get it each time can be expensive, so cache it in the devfreq struct. Signed-off-by: Saravana Kannan <saravanak@google.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org> [ Viresh: Added a blank line ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/devfreq.h')
-rw-r--r--include/linux/devfreq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index b6d3bae1c74d..26ea0850be9b 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -137,6 +137,7 @@ struct devfreq_stats {
* using devfreq.
* @profile: device-specific devfreq profile
* @governor: method how to choose frequency based on the usage.
+ * @opp_table: Reference to OPP table of dev.parent, if one exists.
* @nb: notifier block used to notify devfreq object that it should
* reevaluate operable frequencies. Devfreq users may use
* devfreq.nb to the corresponding register notifier call chain.
@@ -173,6 +174,7 @@ struct devfreq {
struct device dev;
struct devfreq_dev_profile *profile;
const struct devfreq_governor *governor;
+ struct opp_table *opp_table;
struct notifier_block nb;
struct delayed_work work;