File tree Expand file tree Collapse file tree 4 files changed +8
-27
lines changed
translations/zh_CN/cpu-freq Expand file tree Collapse file tree 4 files changed +8
-27
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,6 @@ And optionally
58
58
59
59
.driver_data - cpufreq driver specific data.
60
60
61
- .resolve_freq - Returns the most appropriate frequency for a target
62
- frequency. Doesn't change the frequency though.
63
-
64
61
.get_intermediate and target_intermediate - Used to switch to stable
65
62
frequency while changing CPU frequency.
66
63
Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ CPUfreq核心层注册一个cpufreq_driver结构体。
64
64
65
65
.driver_data - cpufreq驱动程序的特定数据。
66
66
67
- .resolve_freq - 返回最适合目标频率的频率。不过并不能改变频率。
68
-
69
67
.get_intermediate 和 target_intermediate - 用于在改变CPU频率时切换到稳定
70
68
的频率。
71
69
Original file line number Diff line number Diff line change @@ -527,22 +527,17 @@ EXPORT_SYMBOL_GPL(cpufreq_disable_fast_switch);
527
527
static unsigned int __resolve_freq (struct cpufreq_policy * policy ,
528
528
unsigned int target_freq , unsigned int relation )
529
529
{
530
- target_freq = clamp_val (target_freq , policy -> min , policy -> max );
531
- policy -> cached_target_freq = target_freq ;
530
+ unsigned int idx ;
532
531
533
- if (cpufreq_driver -> target_index ) {
534
- unsigned int idx ;
535
-
536
- idx = cpufreq_frequency_table_target (policy , target_freq ,
537
- relation );
538
- policy -> cached_resolved_idx = idx ;
539
- return policy -> freq_table [idx ].frequency ;
540
- }
532
+ target_freq = clamp_val (target_freq , policy -> min , policy -> max );
541
533
542
- if (cpufreq_driver -> resolve_freq )
543
- return cpufreq_driver -> resolve_freq ( policy , target_freq ) ;
534
+ if (! cpufreq_driver -> target_index )
535
+ return target_freq ;
544
536
545
- return target_freq ;
537
+ idx = cpufreq_frequency_table_target (policy , target_freq , relation );
538
+ policy -> cached_resolved_idx = idx ;
539
+ policy -> cached_target_freq = target_freq ;
540
+ return policy -> freq_table [idx ].frequency ;
546
541
}
547
542
548
543
/**
Original file line number Diff line number Diff line change @@ -330,15 +330,6 @@ struct cpufreq_driver {
330
330
unsigned long target_perf ,
331
331
unsigned long capacity );
332
332
333
- /*
334
- * Caches and returns the lowest driver-supported frequency greater than
335
- * or equal to the target frequency, subject to any driver limitations.
336
- * Does not set the frequency. Only to be implemented for drivers with
337
- * target().
338
- */
339
- unsigned int (* resolve_freq )(struct cpufreq_policy * policy ,
340
- unsigned int target_freq );
341
-
342
333
/*
343
334
* Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION
344
335
* unset.
You can’t perform that action at this time.
0 commit comments