diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:13:20 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:13:20 -0400 |
commit | 057beb1de54d33ecfd3397ed219b1f4518e3b470 (patch) | |
tree | 7c67e9d8c88093a3d551111e56401826a964ffba /Documentation/power | |
parent | 42a09284fab8abc15c8554f2e2aa2368161c77c6 (diff) | |
parent | 5ece2399181a5abaf42a4cb607463770686778e6 (diff) |
Merge branch 'pm-cpufreq'
* pm-cpufreq: (28 commits)
cpufreq: handle calls to ->target_index() in separate routine
cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
cpufreq: intel_pstate: Remove unused member name of cpudata
cpufreq: Break out early when frequency equals target_freq
cpufreq: Tegra: drop wrapper around tegra_update_cpu_speed()
cpufreq: imx6q: Remove unused include
cpufreq: imx6q: Drop devm_clk/regulator_get usage
cpufreq: powernow-k8: Suppress checkpatch warnings
cpufreq: powernv: make local function static
cpufreq: Enable big.LITTLE cpufreq driver on arm64
cpufreq: nforce2: remove DEFINE_PCI_DEVICE_TABLE macro
intel_pstate: Add CPU IDs for Broadwell processors
cpufreq: Fix build error on some platforms that use cpufreq_for_each_*
PM / OPP: Move cpufreq specific OPP functions out of generic OPP library
PM / OPP: Remove cpufreq wrapper dependency on internal data organization
cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end
intel_pstate: Remove sample parameter in intel_pstate_calc_busy
cpufreq: Kconfig: Fix spelling errors
cpufreq: Make linux-pm@vger.kernel.org official mailing list
cpufreq: exynos: Use dev_err/info function instead of pr_err/info
...
Diffstat (limited to 'Documentation/power')
-rw-r--r-- | Documentation/power/opp.txt | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt index b8a907dc0169..a9adad828cdc 100644 --- a/Documentation/power/opp.txt +++ b/Documentation/power/opp.txt | |||
@@ -10,8 +10,7 @@ Contents | |||
10 | 3. OPP Search Functions | 10 | 3. OPP Search Functions |
11 | 4. OPP Availability Control Functions | 11 | 4. OPP Availability Control Functions |
12 | 5. OPP Data Retrieval Functions | 12 | 5. OPP Data Retrieval Functions |
13 | 6. Cpufreq Table Generation | 13 | 6. Data Structures |
14 | 7. Data Structures | ||
15 | 14 | ||
16 | 1. Introduction | 15 | 1. Introduction |
17 | =============== | 16 | =============== |
@@ -72,7 +71,6 @@ operations until that OPP could be re-enabled if possible. | |||
72 | OPP library facilitates this concept in it's implementation. The following | 71 | OPP library facilitates this concept in it's implementation. The following |
73 | operational functions operate only on available opps: | 72 | operational functions operate only on available opps: |
74 | opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq, dev_pm_opp_get_opp_count | 73 | opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq, dev_pm_opp_get_opp_count |
75 | and dev_pm_opp_init_cpufreq_table | ||
76 | 74 | ||
77 | dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer which can then | 75 | dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer which can then |
78 | be used for dev_pm_opp_enable/disable functions to make an opp available as required. | 76 | be used for dev_pm_opp_enable/disable functions to make an opp available as required. |
@@ -96,10 +94,9 @@ using RCU read locks. The opp_find_freq_{exact,ceil,floor}, | |||
96 | opp_get_{voltage, freq, opp_count} fall into this category. | 94 | opp_get_{voltage, freq, opp_count} fall into this category. |
97 | 95 | ||
98 | opp_{add,enable,disable} are updaters which use mutex and implement it's own | 96 | opp_{add,enable,disable} are updaters which use mutex and implement it's own |
99 | RCU locking mechanisms. dev_pm_opp_init_cpufreq_table acts as an updater and uses | 97 | RCU locking mechanisms. These functions should *NOT* be called under RCU locks |
100 | mutex to implment RCU updater strategy. These functions should *NOT* be called | 98 | and other contexts that prevent blocking functions in RCU or mutex operations |
101 | under RCU locks and other contexts that prevent blocking functions in RCU or | 99 | from working. |
102 | mutex operations from working. | ||
103 | 100 | ||
104 | 2. Initial OPP List Registration | 101 | 2. Initial OPP List Registration |
105 | ================================ | 102 | ================================ |
@@ -311,34 +308,7 @@ dev_pm_opp_get_opp_count - Retrieve the number of available opps for a device | |||
311 | /* Do other things */ | 308 | /* Do other things */ |
312 | } | 309 | } |
313 | 310 | ||
314 | 6. Cpufreq Table Generation | 311 | 6. Data Structures |
315 | =========================== | ||
316 | dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with | ||
317 | cpufreq_frequency_table_cpuinfo which is provided with the list of | ||
318 | frequencies that are available for operation. This function provides | ||
319 | a ready to use conversion routine to translate the OPP layer's internal | ||
320 | information about the available frequencies into a format readily | ||
321 | providable to cpufreq. | ||
322 | |||
323 | WARNING: Do not use this function in interrupt context. | ||
324 | |||
325 | Example: | ||
326 | soc_pm_init() | ||
327 | { | ||
328 | /* Do things */ | ||
329 | r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); | ||
330 | if (!r) | ||
331 | cpufreq_frequency_table_cpuinfo(policy, freq_table); | ||
332 | /* Do other things */ | ||
333 | } | ||
334 | |||
335 | NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in | ||
336 | addition to CONFIG_PM as power management feature is required to | ||
337 | dynamically scale voltage and frequency in a system. | ||
338 | |||
339 | dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table | ||
340 | |||
341 | 7. Data Structures | ||
342 | ================== | 312 | ================== |
343 | Typically an SoC contains multiple voltage domains which are variable. Each | 313 | Typically an SoC contains multiple voltage domains which are variable. Each |
344 | domain is represented by a device pointer. The relationship to OPP can be | 314 | domain is represented by a device pointer. The relationship to OPP can be |