diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-01 02:50:47 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-01 02:50:47 +0400 |
commit | 89d4f82aa5ccf08dc28dc8b463844e6d7eed591b (patch) | |
tree | 91e7e6ff2c5eda51bb48528244387f32c000433e /Documentation | |
parent | 6712d2931933ada259b82f06c03a855b19937074 (diff) | |
parent | 4229e1c61a4a7ac21d5d0790f6add1c9b98d33e7 (diff) | |
download | linux-89d4f82aa5ccf08dc28dc8b463844e6d7eed591b.tar.xz |
Merge branch 'cpufreq-macros' into pm-cpufreq
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cpu-freq/cpu-drivers.txt | 19 |
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 = ... + } |