aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-12 07:43:02 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-12 07:43:02 -0400
commit589e18a973bd6bb8abd2c6d4d8a1dcf5ae1dff61 (patch)
tree5c6ac2441bbe93ef5ccee8d1d46b8d97959c1f1c /Documentation
parentde815a6d00da0f8a59e8aebf8efe12e289552a8f (diff)
parent5fbfbcd3e842ddfe9dbbe8865feba909963a87ec (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.txt29
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:
261.4 target/target_index or setpolicy? 261.4 target/target_index or setpolicy?
271.5 target/target_index 271.5 target/target_index
281.6 setpolicy 281.6 setpolicy
291.7 get_intermediate and target_intermediate
292. Frequency Table Helpers 302. 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
83cpufreq_driver.get_intermediate
84and target_intermediate Used to switch to stable frequency while
85 changing CPU frequency.
86
82 87
831.2 Per-CPU Initialization 881.2 Per-CPU Initialization
84-------------------------- 89--------------------------
@@ -151,7 +156,7 @@ Some cpufreq-capable processors switch the frequency between certain
151limits on their own. These shall use the ->setpolicy call 156limits on their own. These shall use the ->setpolicy call
152 157
153 158
1541.4. target/target_index 1591.5. target/target_index
155------------- 160-------------
156 161
157The target_index call has two arguments: struct cpufreq_policy *policy, 162The target_index call has two arguments: struct cpufreq_policy *policy,
@@ -160,6 +165,9 @@ and unsigned int index (into the exposed frequency table).
160The CPUfreq driver must set the new frequency when called here. The 165The CPUfreq driver must set the new frequency when called here. The
161actual frequency must be determined by freq_table[index].frequency. 166actual frequency must be determined by freq_table[index].frequency.
162 167
168It should always restore to earlier frequency (i.e. policy->restore_freq) in
169case of errors, even if we switched to intermediate frequency earlier.
170
163Deprecated: 171Deprecated:
164---------- 172----------
165The target call has three arguments: struct cpufreq_policy *policy, 173The 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
179for details. 187for details.
180 188
181 189
1821.5 setpolicy 1901.6 setpolicy
183--------------- 191---------------
184 192
185The setpolicy call only takes a struct cpufreq_policy *policy as 193The setpolicy call only takes a struct cpufreq_policy *policy as
@@ -190,6 +198,23 @@ setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a
190powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check 198powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check
191the reference implementation in drivers/cpufreq/longrun.c 199the reference implementation in drivers/cpufreq/longrun.c
192 200
2011.7 get_intermediate and target_intermediate
202--------------------------------------------
203
204Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION unset.
205
206get_intermediate should return a stable intermediate frequency platform wants to
207switch to, and target_intermediate() should set CPU to to that frequency, before
208jumping to the frequency corresponding to 'index'. Core will take care of
209sending notifications and driver doesn't have to handle them in
210target_intermediate() or target_index().
211
212Drivers can return '0' from get_intermediate() in case they don't wish to switch
213to intermediate frequency for some target frequency. In that case core will
214directly call ->target_index().
215
216NOTE: ->target_index() should restore to policy->restore_freq in case of
217failures as core would send notifications for that.
193 218
194 219
1952. Frequency Table Helpers 2202. Frequency Table Helpers