|
@@ -120,6 +120,10 @@ struct cpufreq_policy {
|
|
|
bool fast_switch_possible;
|
|
|
bool fast_switch_enabled;
|
|
|
|
|
|
+ /* Cached frequency lookup from cpufreq_driver_resolve_freq. */
|
|
|
+ unsigned int cached_target_freq;
|
|
|
+ int cached_resolved_idx;
|
|
|
+
|
|
|
/* Synchronization for frequency transitions */
|
|
|
bool transition_ongoing; /* Tracks transition status */
|
|
|
spinlock_t transition_lock;
|
|
@@ -270,6 +274,16 @@ struct cpufreq_driver {
|
|
|
unsigned int index);
|
|
|
unsigned int (*fast_switch)(struct cpufreq_policy *policy,
|
|
|
unsigned int target_freq);
|
|
|
+
|
|
|
+ /*
|
|
|
+ * Caches and returns the lowest driver-supported frequency greater than
|
|
|
+ * or equal to the target frequency, subject to any driver limitations.
|
|
|
+ * Does not set the frequency. Only to be implemented for drivers with
|
|
|
+ * target().
|
|
|
+ */
|
|
|
+ unsigned int (*resolve_freq)(struct cpufreq_policy *policy,
|
|
|
+ unsigned int target_freq);
|
|
|
+
|
|
|
/*
|
|
|
* Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION
|
|
|
* unset.
|
|
@@ -501,6 +515,8 @@ int cpufreq_driver_target(struct cpufreq_policy *policy,
|
|
|
int __cpufreq_driver_target(struct cpufreq_policy *policy,
|
|
|
unsigned int target_freq,
|
|
|
unsigned int relation);
|
|
|
+unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy,
|
|
|
+ unsigned int target_freq);
|
|
|
int cpufreq_register_governor(struct cpufreq_governor *governor);
|
|
|
void cpufreq_unregister_governor(struct cpufreq_governor *governor);
|
|
|
|