aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cpu-freq
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-03-30 06:55:15 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-04 08:25:59 -0400
commit5070158804b5339c71809f5e673cea1cfacd804d (patch)
tree42256e81e326af4e568a179787e66d434a0b1ffc /Documentation/cpu-freq
parent2361be23666232dbb4851a527f466c4cbf5340fc (diff)
cpufreq: rename index as driver_data in cpufreq_frequency_table
The "index" field of struct cpufreq_frequency_table was never an index and isn't used at all by the cpufreq core. It only is useful for cpufreq drivers for their internal purposes. Many people nowadays blindly set it in ascending order with the assumption that the core will use it, which is a mistake. Rename it to "driver_data" as that's what its purpose is. All of its users are updated accordingly. [rjw: Changelog] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'Documentation/cpu-freq')
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt10
1 files changed, 2 insertions, 8 deletions
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index a3585eac83b6..19fa98e07bf7 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -186,7 +186,7 @@ As most cpufreq processors only allow for being set to a few specific
186frequencies, a "frequency table" with some functions might assist in 186frequencies, a "frequency table" with some functions might assist in
187some work of the processor driver. Such a "frequency table" consists 187some work of the processor driver. Such a "frequency table" consists
188of an array of struct cpufreq_frequency_table entries, with any value in 188of an array of struct cpufreq_frequency_table entries, with any value in
189"index" you want to use, and the corresponding frequency in 189"driver_data" you want to use, and the corresponding frequency in
190"frequency". At the end of the table, you need to add a 190"frequency". At the end of the table, you need to add a
191cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And 191cpufreq_frequency_table entry with frequency set to CPUFREQ_TABLE_END. And
192if you want to skip one entry in the table, set the frequency to 192if you want to skip one entry in the table, set the frequency to
@@ -214,10 +214,4 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
214is the corresponding frequency table helper for the ->target 214is the corresponding frequency table helper for the ->target
215stage. Just pass the values to this function, and the unsigned int 215stage. Just pass the values to this function, and the unsigned int
216index returns the number of the frequency table entry which contains 216index returns the number of the frequency table entry which contains
217the frequency the CPU shall be set to. PLEASE NOTE: This is not the 217the frequency the CPU shall be set to.
218"index" which is in this cpufreq_table_entry.index, but instead
219cpufreq_table[index]. So, the new frequency is
220cpufreq_table[index].frequency, and the value you stored into the
221frequency table "index" field is
222cpufreq_table[index].index.
223