aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/cpu-freq/cpu-drivers.txt27
-rw-r--r--Documentation/cpu-freq/governors.txt4
2 files changed, 20 insertions, 11 deletions
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 40282e617913..8b1a4451422e 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -23,8 +23,8 @@ Contents:
231.1 Initialization 231.1 Initialization
241.2 Per-CPU Initialization 241.2 Per-CPU Initialization
251.3 verify 251.3 verify
261.4 target or setpolicy? 261.4 target/target_index or setpolicy?
271.5 target 271.5 target/target_index
281.6 setpolicy 281.6 setpolicy
292. Frequency Table Helpers 292. Frequency Table Helpers
30 30
@@ -56,7 +56,8 @@ cpufreq_driver.init - A pointer to the per-CPU initialization
56cpufreq_driver.verify - A pointer to a "verification" function. 56cpufreq_driver.verify - A pointer to a "verification" function.
57 57
58cpufreq_driver.setpolicy _or_ 58cpufreq_driver.setpolicy _or_
59cpufreq_driver.target - See below on the differences. 59cpufreq_driver.target/
60target_index - See below on the differences.
60 61
61And optionally 62And optionally
62 63
@@ -66,7 +67,7 @@ cpufreq_driver.resume - A pointer to a per-CPU resume function
66 which is called with interrupts disabled 67 which is called with interrupts disabled
67 and _before_ the pre-suspend frequency 68 and _before_ the pre-suspend frequency
68 and/or policy is restored by a call to 69 and/or policy is restored by a call to
69 ->target or ->setpolicy. 70 ->target/target_index or ->setpolicy.
70 71
71cpufreq_driver.attr - A pointer to a NULL-terminated list of 72cpufreq_driver.attr - A pointer to a NULL-terminated list of
72 "struct freq_attr" which allow to 73 "struct freq_attr" which allow to
@@ -103,8 +104,8 @@ policy->governor must contain the "default policy" for
103 this CPU. A few moments later, 104 this CPU. A few moments later,
104 cpufreq_driver.verify and either 105 cpufreq_driver.verify and either
105 cpufreq_driver.setpolicy or 106 cpufreq_driver.setpolicy or
106 cpufreq_driver.target is called with 107 cpufreq_driver.target/target_index is called
107 these values. 108 with these values.
108 109
109For setting some of these values (cpuinfo.min[max]_freq, policy->min[max]), the 110For setting some of these values (cpuinfo.min[max]_freq, policy->min[max]), the
110frequency table helpers might be helpful. See the section 2 for more information 111frequency table helpers might be helpful. See the section 2 for more information
@@ -133,20 +134,28 @@ range) is within policy->min and policy->max. If necessary, increase
133policy->max first, and only if this is no solution, decrease policy->min. 134policy->max first, and only if this is no solution, decrease policy->min.
134 135
135 136
1361.4 target or setpolicy? 1371.4 target/target_index or setpolicy?
137---------------------------- 138----------------------------
138 139
139Most cpufreq drivers or even most cpu frequency scaling algorithms 140Most cpufreq drivers or even most cpu frequency scaling algorithms
140only allow the CPU to be set to one frequency. For these, you use the 141only allow the CPU to be set to one frequency. For these, you use the
141->target call. 142->target/target_index call.
142 143
143Some cpufreq-capable processors switch the frequency between certain 144Some cpufreq-capable processors switch the frequency between certain
144limits on their own. These shall use the ->setpolicy call 145limits on their own. These shall use the ->setpolicy call
145 146
146 147
1471.4. target 1481.4. target/target_index
148------------- 149-------------
149 150
151The target_index call has two arguments: struct cpufreq_policy *policy,
152and unsigned int index (into the exposed frequency table).
153
154The CPUfreq driver must set the new frequency when called here. The
155actual frequency must be determined by freq_table[index].frequency.
156
157Deprecated:
158----------
150The target call has three arguments: struct cpufreq_policy *policy, 159The target call has three arguments: struct cpufreq_policy *policy,
151unsigned int target_frequency, unsigned int relation. 160unsigned int target_frequency, unsigned int relation.
152 161
diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index 219970ba54b7..77ec21574fb1 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -40,7 +40,7 @@ Most cpufreq drivers (in fact, all except one, longrun) or even most
40cpu frequency scaling algorithms only offer the CPU to be set to one 40cpu frequency scaling algorithms only offer the CPU to be set to one
41frequency. In order to offer dynamic frequency scaling, the cpufreq 41frequency. In order to offer dynamic frequency scaling, the cpufreq
42core must be able to tell these drivers of a "target frequency". So 42core must be able to tell these drivers of a "target frequency". So
43these specific drivers will be transformed to offer a "->target" 43these specific drivers will be transformed to offer a "->target/target_index"
44call instead of the existing "->setpolicy" call. For "longrun", all 44call instead of the existing "->setpolicy" call. For "longrun", all
45stays the same, though. 45stays the same, though.
46 46
@@ -71,7 +71,7 @@ CPU can be set to switch independently | CPU can only be set
71 / the limits of policy->{min,max} 71 / the limits of policy->{min,max}
72 / \ 72 / \
73 / \ 73 / \
74 Using the ->setpolicy call, Using the ->target call, 74 Using the ->setpolicy call, Using the ->target/target_index call,
75 the limits and the the frequency closest 75 the limits and the the frequency closest
76 "policy" is set. to target_freq is set. 76 "policy" is set. to target_freq is set.
77 It is assured that it 77 It is assured that it