summaryrefslogtreecommitdiffstats
path: root/Documentation/cpu-freq
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/cpu-freq')
-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
228stage. Just pass the values to this function, and the unsigned int 228stage. Just pass the values to this function, and the unsigned int
229index returns the number of the frequency table entry which contains 229index returns the number of the frequency table entry which contains
230the frequency the CPU shall be set to. 230the frequency the CPU shall be set to.
231
232The following macros can be used as iterators over cpufreq_frequency_table:
233
234cpufreq_for_each_entry(pos, table) - iterates over all entries of frequency
235table.
236
237cpufreq-for_each_valid_entry(pos, table) - iterates over all entries,
238excluding CPUFREQ_ENTRY_INVALID frequencies.
239Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and
240"table" - the cpufreq_frequency_table * you want to iterate over.
241
242For example:
243
244 struct cpufreq_frequency_table *pos, *driver_freq_table;
245
246 cpufreq_for_each_entry(pos, driver_freq_table) {
247 /* Do something with pos */
248 pos->frequency = ...
249 }