summaryrefslogtreecommitdiff
path: root/Documentation/cpu-freq/cpu-drivers.txt
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-03 15:03:27 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-03 15:03:27 +0200
commit5ece2399181a5abaf42a4cb607463770686778e6 (patch)
tree5c789755fce670511f2ac1bc3eebf39e26ed1724 /Documentation/cpu-freq/cpu-drivers.txt
parentbf8102228a8bf053051f311e5486042fe0542894 (diff)
parent8d65775d17941d6d41f5913fc6a99a134c588e01 (diff)
Merge back earlier cpufreq material.
Conflicts: arch/mips/loongson/lemote-2f/clock.c drivers/cpufreq/intel_pstate.c
Diffstat (limited to 'Documentation/cpu-freq/cpu-drivers.txt')
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 48da5fdcb9f1..b045fe54986a 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -228,3 +228,22 @@ is the corresponding frequency table helper for the ->target
stage. Just pass the values to this function, and the unsigned int
index returns the number of the frequency table entry which contains
the frequency the CPU shall be set to.
+
+The following macros can be used as iterators over cpufreq_frequency_table:
+
+cpufreq_for_each_entry(pos, table) - iterates over all entries of frequency
+table.
+
+cpufreq-for_each_valid_entry(pos, table) - iterates over all entries,
+excluding CPUFREQ_ENTRY_INVALID frequencies.
+Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and
+"table" - the cpufreq_frequency_table * you want to iterate over.
+
+For example:
+
+ struct cpufreq_frequency_table *pos, *driver_freq_table;
+
+ cpufreq_for_each_entry(pos, driver_freq_table) {
+ /* Do something with pos */
+ pos->frequency = ...
+ }