cpufreq: Add special-purpose fast-switching callback for drivers
[sfrench/cifs-2.6.git] / include / linux / cpufreq.h
index 584fccd4fcabb8114f32e2f6b87c2933bbd640b5..9c8b7437b6cd377275d9c79920d57e737664ee62 100644 (file)
@@ -320,6 +320,15 @@ struct cpufreq_driver {
                                        unsigned int index);
        unsigned int    (*fast_switch)(struct cpufreq_policy *policy,
                                       unsigned int target_freq);
+       /*
+        * ->fast_switch() replacement for drivers that use an internal
+        * representation of performance levels and can pass hints other than
+        * the target performance level to the hardware.
+        */
+       void            (*adjust_perf)(unsigned int cpu,
+                                      unsigned long min_perf,
+                                      unsigned long target_perf,
+                                      unsigned long capacity);
 
        /*
         * Caches and returns the lowest driver-supported frequency greater than
@@ -588,6 +597,11 @@ struct cpufreq_governor {
 /* Pass a target to the cpufreq driver */
 unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
                                        unsigned int target_freq);
+void cpufreq_driver_adjust_perf(unsigned int cpu,
+                               unsigned long min_perf,
+                               unsigned long target_perf,
+                               unsigned long capacity);
+bool cpufreq_driver_has_adjust_perf(void);
 int cpufreq_driver_target(struct cpufreq_policy *policy,
                                 unsigned int target_freq,
                                 unsigned int relation);