diff options
Diffstat (limited to 'Documentation/cpu-freq/core.txt')
-rw-r--r-- | Documentation/cpu-freq/core.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt index 0060d76b445f..70933eadc308 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.txt | |||
@@ -20,6 +20,7 @@ Contents: | |||
20 | --------- | 20 | --------- |
21 | 1. CPUFreq core and interfaces | 21 | 1. CPUFreq core and interfaces |
22 | 2. CPUFreq notifiers | 22 | 2. CPUFreq notifiers |
23 | 3. CPUFreq Table Generation with Operating Performance Point (OPP) | ||
23 | 24 | ||
24 | 1. General Information | 25 | 1. General Information |
25 | ======================= | 26 | ======================= |
@@ -92,3 +93,31 @@ values: | |||
92 | cpu - number of the affected CPU | 93 | cpu - number of the affected CPU |
93 | old - old frequency | 94 | old - old frequency |
94 | new - new frequency | 95 | new - new frequency |
96 | |||
97 | 3. CPUFreq Table Generation with Operating Performance Point (OPP) | ||
98 | ================================================================== | ||
99 | For details about OPP, see Documentation/power/opp.txt | ||
100 | |||
101 | dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with | ||
102 | cpufreq_frequency_table_cpuinfo which is provided with the list of | ||
103 | frequencies that are available for operation. This function provides | ||
104 | a ready to use conversion routine to translate the OPP layer's internal | ||
105 | information about the available frequencies into a format readily | ||
106 | providable to cpufreq. | ||
107 | |||
108 | WARNING: Do not use this function in interrupt context. | ||
109 | |||
110 | Example: | ||
111 | soc_pm_init() | ||
112 | { | ||
113 | /* Do things */ | ||
114 | r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); | ||
115 | if (!r) | ||
116 | cpufreq_frequency_table_cpuinfo(policy, freq_table); | ||
117 | /* Do other things */ | ||
118 | } | ||
119 | |||
120 | NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in | ||
121 | addition to CONFIG_PM_OPP. | ||
122 | |||
123 | dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table | ||