diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-12 07:43:02 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-12 07:43:02 -0400 |
commit | 589e18a973bd6bb8abd2c6d4d8a1dcf5ae1dff61 (patch) | |
tree | 5c6ac2441bbe93ef5ccee8d1d46b8d97959c1f1c /Documentation | |
parent | de815a6d00da0f8a59e8aebf8efe12e289552a8f (diff) | |
parent | 5fbfbcd3e842ddfe9dbbe8865feba909963a87ec (diff) |
Merge branch 'pm-cpufreq'
* pm-cpufreq:
cpufreq: cpufreq-cpu0: remove dependency on THERMAL and REGULATOR
cpufreq: tegra: update comment for clarity
cpufreq: intel_pstate: Remove duplicate CPU ID check
cpufreq: Mark CPU0 driver with CPUFREQ_NEED_INITIAL_FREQ_CHECK flag
cpufreq: governor: remove copy_prev_load from 'struct cpu_dbs_common_info'
cpufreq: governor: Be friendly towards latency-sensitive bursty workloads
cpufreq: ppc-corenet-cpu-freq: do_div use quotient
Revert "cpufreq: Enable big.LITTLE cpufreq driver on arm64"
cpufreq: Tegra: implement intermediate frequency callbacks
cpufreq: add support for intermediate (stable) frequencies
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/cpu-freq/cpu-drivers.txt | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index b045fe54986a..14f4e6336d88 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
@@ -26,6 +26,7 @@ Contents: | |||
26 | 1.4 target/target_index or setpolicy? | 26 | 1.4 target/target_index or setpolicy? |
27 | 1.5 target/target_index | 27 | 1.5 target/target_index |
28 | 1.6 setpolicy | 28 | 1.6 setpolicy |
29 | 1.7 get_intermediate and target_intermediate | ||
29 | 2. Frequency Table Helpers | 30 | 2. Frequency Table Helpers |
30 | 31 | ||
31 | 32 | ||
@@ -79,6 +80,10 @@ cpufreq_driver.attr - A pointer to a NULL-terminated list of | |||
79 | "struct freq_attr" which allow to | 80 | "struct freq_attr" which allow to |
80 | export values to sysfs. | 81 | export values to sysfs. |
81 | 82 | ||
83 | cpufreq_driver.get_intermediate | ||
84 | and target_intermediate Used to switch to stable frequency while | ||
85 | changing CPU frequency. | ||
86 | |||
82 | 87 | ||
83 | 1.2 Per-CPU Initialization | 88 | 1.2 Per-CPU Initialization |
84 | -------------------------- | 89 | -------------------------- |
@@ -151,7 +156,7 @@ Some cpufreq-capable processors switch the frequency between certain | |||
151 | limits on their own. These shall use the ->setpolicy call | 156 | limits on their own. These shall use the ->setpolicy call |
152 | 157 | ||
153 | 158 | ||
154 | 1.4. target/target_index | 159 | 1.5. target/target_index |
155 | ------------- | 160 | ------------- |
156 | 161 | ||
157 | The target_index call has two arguments: struct cpufreq_policy *policy, | 162 | The target_index call has two arguments: struct cpufreq_policy *policy, |
@@ -160,6 +165,9 @@ and unsigned int index (into the exposed frequency table). | |||
160 | The CPUfreq driver must set the new frequency when called here. The | 165 | The CPUfreq driver must set the new frequency when called here. The |
161 | actual frequency must be determined by freq_table[index].frequency. | 166 | actual frequency must be determined by freq_table[index].frequency. |
162 | 167 | ||
168 | It should always restore to earlier frequency (i.e. policy->restore_freq) in | ||
169 | case of errors, even if we switched to intermediate frequency earlier. | ||
170 | |||
163 | Deprecated: | 171 | Deprecated: |
164 | ---------- | 172 | ---------- |
165 | The target call has three arguments: struct cpufreq_policy *policy, | 173 | The target call has three arguments: struct cpufreq_policy *policy, |
@@ -179,7 +187,7 @@ Here again the frequency table helper might assist you - see section 2 | |||
179 | for details. | 187 | for details. |
180 | 188 | ||
181 | 189 | ||
182 | 1.5 setpolicy | 190 | 1.6 setpolicy |
183 | --------------- | 191 | --------------- |
184 | 192 | ||
185 | The setpolicy call only takes a struct cpufreq_policy *policy as | 193 | The setpolicy call only takes a struct cpufreq_policy *policy as |
@@ -190,6 +198,23 @@ setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a | |||
190 | powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check | 198 | powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check |
191 | the reference implementation in drivers/cpufreq/longrun.c | 199 | the reference implementation in drivers/cpufreq/longrun.c |
192 | 200 | ||
201 | 1.7 get_intermediate and target_intermediate | ||
202 | -------------------------------------------- | ||
203 | |||
204 | Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION unset. | ||
205 | |||
206 | get_intermediate should return a stable intermediate frequency platform wants to | ||
207 | switch to, and target_intermediate() should set CPU to to that frequency, before | ||
208 | jumping to the frequency corresponding to 'index'. Core will take care of | ||
209 | sending notifications and driver doesn't have to handle them in | ||
210 | target_intermediate() or target_index(). | ||
211 | |||
212 | Drivers can return '0' from get_intermediate() in case they don't wish to switch | ||
213 | to intermediate frequency for some target frequency. In that case core will | ||
214 | directly call ->target_index(). | ||
215 | |||
216 | NOTE: ->target_index() should restore to policy->restore_freq in case of | ||
217 | failures as core would send notifications for that. | ||
193 | 218 | ||
194 | 219 | ||
195 | 2. Frequency Table Helpers | 220 | 2. Frequency Table Helpers |