aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-03 18:05:13 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-09-03 18:05:13 -0400
commitbd87c8fb9d2e420e5ddffad0cd1abcadfca75dbd (patch)
treef45108c87680dad2396080cae8c24b5d7bde4bd6 /include/linux
parent45a7953c831c5885a4c6eddeeda4fe7628b3a96d (diff)
parentfded5fc8412a0bfadd2b130433109a5be7ffdf82 (diff)
Merge branch 'pm-cpufreq'
* pm-cpufreq: (33 commits) cpufreq: imx6q: Fix imx6sx low frequency support cpufreq: speedstep-lib: make several arrays static, makes code smaller cpufreq: ti: Fix 'of_node_put' being called twice in error handling path cpufreq: dt-platdev: Drop few entries from whitelist cpufreq: dt-platdev: Automatically create cpufreq device with OPP v2 ARM: ux500: don't select CPUFREQ_DT cpufreq: Convert to using %pOF instead of full_name cpufreq: Cap the default transition delay value to 10 ms cpufreq: dbx500: Delete obsolete driver mfd: db8500-prcmu: Get rid of cpufreq dependency cpufreq: enable the DT cpufreq driver on the Ux500 cpufreq: Loongson2: constify platform_device_id cpufreq: dt: Add r8a7796 support to to use generic cpufreq driver cpufreq: remove setting of policy->cpu in policy->cpus during init cpufreq: mediatek: add support of cpufreq to MT7622 SoC cpufreq: mediatek: add cleanups with the more generic naming cpufreq: rcar: Add support for R8A7795 SoC cpufreq: dt: Add rk3328 compatible to use generic cpufreq driver cpufreq: s5pv210: add missing of_node_put() cpufreq: Allow dynamic switching with CPUFREQ_ETERNAL latency ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpufreq.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index f10a9b3761cd..5f40522ec98c 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -370,6 +370,12 @@ struct cpufreq_driver {
370 */ 370 */
371#define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5) 371#define CPUFREQ_NEED_INITIAL_FREQ_CHECK (1 << 5)
372 372
373/*
374 * Set by drivers to disallow use of governors with "dynamic_switching" flag
375 * set.
376 */
377#define CPUFREQ_NO_AUTO_DYNAMIC_SWITCHING (1 << 6)
378
373int cpufreq_register_driver(struct cpufreq_driver *driver_data); 379int cpufreq_register_driver(struct cpufreq_driver *driver_data);
374int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); 380int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
375 381
@@ -487,14 +493,8 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div,
487 * polling frequency is 1000 times the transition latency of the processor. The 493 * polling frequency is 1000 times the transition latency of the processor. The
488 * ondemand governor will work on any processor with transition latency <= 10ms, 494 * ondemand governor will work on any processor with transition latency <= 10ms,
489 * using appropriate sampling rate. 495 * using appropriate sampling rate.
490 *
491 * For CPUs with transition latency > 10ms (mostly drivers with CPUFREQ_ETERNAL)
492 * the ondemand governor will not work. All times here are in us (microseconds).
493 */ 496 */
494#define MIN_SAMPLING_RATE_RATIO (2)
495#define LATENCY_MULTIPLIER (1000) 497#define LATENCY_MULTIPLIER (1000)
496#define MIN_LATENCY_MULTIPLIER (20)
497#define TRANSITION_LATENCY_LIMIT (10 * 1000 * 1000)
498 498
499struct cpufreq_governor { 499struct cpufreq_governor {
500 char name[CPUFREQ_NAME_LEN]; 500 char name[CPUFREQ_NAME_LEN];
@@ -507,9 +507,8 @@ struct cpufreq_governor {
507 char *buf); 507 char *buf);
508 int (*store_setspeed) (struct cpufreq_policy *policy, 508 int (*store_setspeed) (struct cpufreq_policy *policy,
509 unsigned int freq); 509 unsigned int freq);
510 unsigned int max_transition_latency; /* HW must be able to switch to 510 /* For governors which change frequency dynamically by themselves */
511 next freq faster than this value in nano secs or we 511 bool dynamic_switching;
512 will fallback to performance governor */
513 struct list_head governor_list; 512 struct list_head governor_list;
514 struct module *owner; 513 struct module *owner;
515}; 514};
@@ -525,6 +524,7 @@ int __cpufreq_driver_target(struct cpufreq_policy *policy,
525 unsigned int relation); 524 unsigned int relation);
526unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, 525unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy,
527 unsigned int target_freq); 526 unsigned int target_freq);
527unsigned int cpufreq_policy_transition_delay_us(struct cpufreq_policy *policy);
528int cpufreq_register_governor(struct cpufreq_governor *governor); 528int cpufreq_register_governor(struct cpufreq_governor *governor);
529void cpufreq_unregister_governor(struct cpufreq_governor *governor); 529void cpufreq_unregister_governor(struct cpufreq_governor *governor);
530 530