diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cpu-freq/cpu-drivers.txt | 27 | ||||
-rw-r--r-- | Documentation/cpu-freq/governors.txt | 4 |
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: | |||
23 | 1.1 Initialization | 23 | 1.1 Initialization |
24 | 1.2 Per-CPU Initialization | 24 | 1.2 Per-CPU Initialization |
25 | 1.3 verify | 25 | 1.3 verify |
26 | 1.4 target or setpolicy? | 26 | 1.4 target/target_index or setpolicy? |
27 | 1.5 target | 27 | 1.5 target/target_index |
28 | 1.6 setpolicy | 28 | 1.6 setpolicy |
29 | 2. Frequency Table Helpers | 29 | 2. Frequency Table Helpers |
30 | 30 | ||
@@ -56,7 +56,8 @@ cpufreq_driver.init - A pointer to the per-CPU initialization | |||
56 | cpufreq_driver.verify - A pointer to a "verification" function. | 56 | cpufreq_driver.verify - A pointer to a "verification" function. |
57 | 57 | ||
58 | cpufreq_driver.setpolicy _or_ | 58 | cpufreq_driver.setpolicy _or_ |
59 | cpufreq_driver.target - See below on the differences. | 59 | cpufreq_driver.target/ |
60 | target_index - See below on the differences. | ||
60 | 61 | ||
61 | And optionally | 62 | And 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 | ||
71 | cpufreq_driver.attr - A pointer to a NULL-terminated list of | 72 | cpufreq_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 | ||
109 | For setting some of these values (cpuinfo.min[max]_freq, policy->min[max]), the | 110 | For setting some of these values (cpuinfo.min[max]_freq, policy->min[max]), the |
110 | frequency table helpers might be helpful. See the section 2 for more information | 111 | frequency 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 | |||
133 | policy->max first, and only if this is no solution, decrease policy->min. | 134 | policy->max first, and only if this is no solution, decrease policy->min. |
134 | 135 | ||
135 | 136 | ||
136 | 1.4 target or setpolicy? | 137 | 1.4 target/target_index or setpolicy? |
137 | ---------------------------- | 138 | ---------------------------- |
138 | 139 | ||
139 | Most cpufreq drivers or even most cpu frequency scaling algorithms | 140 | Most cpufreq drivers or even most cpu frequency scaling algorithms |
140 | only allow the CPU to be set to one frequency. For these, you use the | 141 | only allow the CPU to be set to one frequency. For these, you use the |
141 | ->target call. | 142 | ->target/target_index call. |
142 | 143 | ||
143 | Some cpufreq-capable processors switch the frequency between certain | 144 | Some cpufreq-capable processors switch the frequency between certain |
144 | limits on their own. These shall use the ->setpolicy call | 145 | limits on their own. These shall use the ->setpolicy call |
145 | 146 | ||
146 | 147 | ||
147 | 1.4. target | 148 | 1.4. target/target_index |
148 | ------------- | 149 | ------------- |
149 | 150 | ||
151 | The target_index call has two arguments: struct cpufreq_policy *policy, | ||
152 | and unsigned int index (into the exposed frequency table). | ||
153 | |||
154 | The CPUfreq driver must set the new frequency when called here. The | ||
155 | actual frequency must be determined by freq_table[index].frequency. | ||
156 | |||
157 | Deprecated: | ||
158 | ---------- | ||
150 | The target call has three arguments: struct cpufreq_policy *policy, | 159 | The target call has three arguments: struct cpufreq_policy *policy, |
151 | unsigned int target_frequency, unsigned int relation. | 160 | unsigned 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 | |||
40 | cpu frequency scaling algorithms only offer the CPU to be set to one | 40 | cpu frequency scaling algorithms only offer the CPU to be set to one |
41 | frequency. In order to offer dynamic frequency scaling, the cpufreq | 41 | frequency. In order to offer dynamic frequency scaling, the cpufreq |
42 | core must be able to tell these drivers of a "target frequency". So | 42 | core must be able to tell these drivers of a "target frequency". So |
43 | these specific drivers will be transformed to offer a "->target" | 43 | these specific drivers will be transformed to offer a "->target/target_index" |
44 | call instead of the existing "->setpolicy" call. For "longrun", all | 44 | call instead of the existing "->setpolicy" call. For "longrun", all |
45 | stays the same, though. | 45 | stays 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 |