freq_table.c (38fd2c202a3d82bc12430bce5789fa2c2a406f71) | freq_table.c (d3916691c90dfc9f08328d5cef8181e9ea508c55) |
---|---|
1/* 2 * linux/drivers/cpufreq/freq_table.c 3 * 4 * Copyright (C) 2002 - 2003 Dominik Brodowski 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 164 unchanged lines hidden (view full) --- 173 174 pr_debug("target is %u (%u kHz, %u)\n", *index, table[*index].frequency, 175 table[*index].driver_data); 176 177 return 0; 178} 179EXPORT_SYMBOL_GPL(cpufreq_frequency_table_target); 180 | 1/* 2 * linux/drivers/cpufreq/freq_table.c 3 * 4 * Copyright (C) 2002 - 2003 Dominik Brodowski 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. --- 164 unchanged lines hidden (view full) --- 173 174 pr_debug("target is %u (%u kHz, %u)\n", *index, table[*index].frequency, 175 table[*index].driver_data); 176 177 return 0; 178} 179EXPORT_SYMBOL_GPL(cpufreq_frequency_table_target); 180 |
181int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy, 182 unsigned int freq) 183{ 184 struct cpufreq_frequency_table *table; 185 int i; 186 187 table = cpufreq_frequency_get_table(policy->cpu); 188 if (unlikely(!table)) { 189 pr_debug("%s: Unable to find frequency table\n", __func__); 190 return -ENOENT; 191 } 192 193 for (i = 0; table[i].frequency != CPUFREQ_TABLE_END; i++) { 194 if (table[i].frequency == freq) 195 return i; 196 } 197 198 return -EINVAL; 199} 200EXPORT_SYMBOL_GPL(cpufreq_frequency_table_get_index); 201 |
|
181static DEFINE_PER_CPU(struct cpufreq_frequency_table *, cpufreq_show_table); | 202static DEFINE_PER_CPU(struct cpufreq_frequency_table *, cpufreq_show_table); |
203 |
|
182/** 183 * show_available_freqs - show available frequencies for the specified CPU 184 */ 185static ssize_t show_available_freqs(struct cpufreq_policy *policy, char *buf) 186{ 187 unsigned int i = 0; 188 unsigned int cpu = policy->cpu; 189 ssize_t count = 0; --- 81 unchanged lines hidden --- | 204/** 205 * show_available_freqs - show available frequencies for the specified CPU 206 */ 207static ssize_t show_available_freqs(struct cpufreq_policy *policy, char *buf) 208{ 209 unsigned int i = 0; 210 unsigned int cpu = policy->cpu; 211 ssize_t count = 0; --- 81 unchanged lines hidden --- |