summaryrefslogtreecommitdiff
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-11-10 18:25:57 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-11-10 18:31:17 +0100
commit9a2a9ebc0a758d887ee06e067e9f7f0b36ff7574 (patch)
treea0da576cf684de92587993f5e62cd5e3eacf8515 /include/linux/cpufreq.h
parentf8394f232b1eab649ce2df5c5f15b0e528c92091 (diff)
downloadlwn-9a2a9ebc0a758d887ee06e067e9f7f0b36ff7574.tar.gz
lwn-9a2a9ebc0a758d887ee06e067e9f7f0b36ff7574.zip
cpufreq: Introduce governor flags
A new cpufreq governor flag will be added subsequently, so replace the bool dynamic_switching fleid in struct cpufreq_governor with a flags field and introduce CPUFREQ_GOV_DYNAMIC_SWITCHING to set for the "dynamic switching" governors instead of it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 1eaa04f1bae6..9bdfcf3c4748 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -570,12 +570,17 @@ struct cpufreq_governor {
char *buf);
int (*store_setspeed) (struct cpufreq_policy *policy,
unsigned int freq);
- /* For governors which change frequency dynamically by themselves */
- bool dynamic_switching;
struct list_head governor_list;
struct module *owner;
+ u8 flags;
};
+/* Governor flags */
+
+/* For governors which change frequency dynamically by themselves */
+#define CPUFREQ_GOV_DYNAMIC_SWITCHING BIT(0)
+
+
/* Pass a target to the cpufreq driver */
unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
unsigned int target_freq);