aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 815902c2c856..a9163d02983a 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -823,6 +823,30 @@ static void cpufreq_out_of_sync(unsigned int cpu, unsigned int old_freq, unsigne
823 823
824 824
825/** 825/**
826 * cpufreq_quick_get - get the CPU frequency (in kHz) frpm policy->cur
827 * @cpu: CPU number
828 *
829 * This is the last known freq, without actually getting it from the driver.
830 * Return value will be same as what is shown in scaling_cur_freq in sysfs.
831 */
832unsigned int cpufreq_quick_get(unsigned int cpu)
833{
834 struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
835 unsigned int ret = 0;
836
837 if (policy) {
838 down(&policy->lock);
839 ret = policy->cur;
840 up(&policy->lock);
841 cpufreq_cpu_put(policy);
842 }
843
844 return (ret);
845}
846EXPORT_SYMBOL(cpufreq_quick_get);
847
848
849/**
826 * cpufreq_get - get the current CPU frequency (in kHz) 850 * cpufreq_get - get the current CPU frequency (in kHz)
827 * @cpu: CPU number 851 * @cpu: CPU number
828 * 852 *