diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:13:20 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-06-03 17:13:20 -0400 |
| commit | 057beb1de54d33ecfd3397ed219b1f4518e3b470 (patch) | |
| tree | 7c67e9d8c88093a3d551111e56401826a964ffba /include/linux | |
| parent | 42a09284fab8abc15c8554f2e2aa2368161c77c6 (diff) | |
| parent | 5ece2399181a5abaf42a4cb607463770686778e6 (diff) | |
Merge branch 'pm-cpufreq'
* pm-cpufreq: (28 commits)
cpufreq: handle calls to ->target_index() in separate routine
cpufreq: s5pv210: drop check for CONFIG_PM_VERBOSE
cpufreq: intel_pstate: Remove unused member name of cpudata
cpufreq: Break out early when frequency equals target_freq
cpufreq: Tegra: drop wrapper around tegra_update_cpu_speed()
cpufreq: imx6q: Remove unused include
cpufreq: imx6q: Drop devm_clk/regulator_get usage
cpufreq: powernow-k8: Suppress checkpatch warnings
cpufreq: powernv: make local function static
cpufreq: Enable big.LITTLE cpufreq driver on arm64
cpufreq: nforce2: remove DEFINE_PCI_DEVICE_TABLE macro
intel_pstate: Add CPU IDs for Broadwell processors
cpufreq: Fix build error on some platforms that use cpufreq_for_each_*
PM / OPP: Move cpufreq specific OPP functions out of generic OPP library
PM / OPP: Remove cpufreq wrapper dependency on internal data organization
cpufreq: Catch double invocations of cpufreq_freq_transition_begin/end
intel_pstate: Remove sample parameter in intel_pstate_calc_busy
cpufreq: Kconfig: Fix spelling errors
cpufreq: Make linux-pm@vger.kernel.org official mailing list
cpufreq: exynos: Use dev_err/info function instead of pr_err/info
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 50 | ||||
| -rw-r--r-- | include/linux/pm_opp.h | 20 |
2 files changed, 50 insertions, 20 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 5ae5100c1f24..3f458896d45c 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -110,6 +110,7 @@ struct cpufreq_policy { | |||
| 110 | bool transition_ongoing; /* Tracks transition status */ | 110 | bool transition_ongoing; /* Tracks transition status */ |
| 111 | spinlock_t transition_lock; | 111 | spinlock_t transition_lock; |
| 112 | wait_queue_head_t transition_wait; | 112 | wait_queue_head_t transition_wait; |
| 113 | struct task_struct *transition_task; /* Task which is doing the transition */ | ||
| 113 | }; | 114 | }; |
| 114 | 115 | ||
| 115 | /* Only for ACPI */ | 116 | /* Only for ACPI */ |
| @@ -468,6 +469,55 @@ struct cpufreq_frequency_table { | |||
| 468 | * order */ | 469 | * order */ |
| 469 | }; | 470 | }; |
| 470 | 471 | ||
| 472 | #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) | ||
| 473 | int dev_pm_opp_init_cpufreq_table(struct device *dev, | ||
| 474 | struct cpufreq_frequency_table **table); | ||
| 475 | void dev_pm_opp_free_cpufreq_table(struct device *dev, | ||
| 476 | struct cpufreq_frequency_table **table); | ||
| 477 | #else | ||
| 478 | static inline int dev_pm_opp_init_cpufreq_table(struct device *dev, | ||
| 479 | struct cpufreq_frequency_table | ||
| 480 | **table) | ||
| 481 | { | ||
| 482 | return -EINVAL; | ||
| 483 | } | ||
| 484 | |||
| 485 | static inline void dev_pm_opp_free_cpufreq_table(struct device *dev, | ||
| 486 | struct cpufreq_frequency_table | ||
| 487 | **table) | ||
| 488 | { | ||
| 489 | } | ||
| 490 | #endif | ||
| 491 | |||
| 492 | static inline bool cpufreq_next_valid(struct cpufreq_frequency_table **pos) | ||
| 493 | { | ||
| 494 | while ((*pos)->frequency != CPUFREQ_TABLE_END) | ||
| 495 | if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID) | ||
| 496 | return true; | ||
| 497 | else | ||
| 498 | (*pos)++; | ||
| 499 | return false; | ||
| 500 | } | ||
| 501 | |||
| 502 | /* | ||
| 503 | * cpufreq_for_each_entry - iterate over a cpufreq_frequency_table | ||
| 504 | * @pos: the cpufreq_frequency_table * to use as a loop cursor. | ||
| 505 | * @table: the cpufreq_frequency_table * to iterate over. | ||
| 506 | */ | ||
| 507 | |||
| 508 | #define cpufreq_for_each_entry(pos, table) \ | ||
| 509 | for (pos = table; pos->frequency != CPUFREQ_TABLE_END; pos++) | ||
| 510 | |||
| 511 | /* | ||
| 512 | * cpufreq_for_each_valid_entry - iterate over a cpufreq_frequency_table | ||
| 513 | * excluding CPUFREQ_ENTRY_INVALID frequencies. | ||
| 514 | * @pos: the cpufreq_frequency_table * to use as a loop cursor. | ||
| 515 | * @table: the cpufreq_frequency_table * to iterate over. | ||
| 516 | */ | ||
| 517 | |||
| 518 | #define cpufreq_for_each_valid_entry(pos, table) \ | ||
| 519 | for (pos = table; cpufreq_next_valid(&pos); pos++) | ||
| 520 | |||
| 471 | int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, | 521 | int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy, |
| 472 | struct cpufreq_frequency_table *table); | 522 | struct cpufreq_frequency_table *table); |
| 473 | 523 | ||
diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 5151b0059585..0330217abfad 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #define __LINUX_OPP_H__ | 15 | #define __LINUX_OPP_H__ |
| 16 | 16 | ||
| 17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
| 18 | #include <linux/cpufreq.h> | ||
| 19 | #include <linux/notifier.h> | 18 | #include <linux/notifier.h> |
| 20 | 19 | ||
| 21 | struct dev_pm_opp; | 20 | struct dev_pm_opp; |
| @@ -117,23 +116,4 @@ static inline int of_init_opp_table(struct device *dev) | |||
| 117 | } | 116 | } |
| 118 | #endif | 117 | #endif |
| 119 | 118 | ||
| 120 | #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP) | ||
| 121 | int dev_pm_opp_init_cpufreq_table(struct device *dev, | ||
| 122 | struct cpufreq_frequency_table **table); | ||
| 123 | void dev_pm_opp_free_cpufreq_table(struct device *dev, | ||
| 124 | struct cpufreq_frequency_table **table); | ||
| 125 | #else | ||
| 126 | static inline int dev_pm_opp_init_cpufreq_table(struct device *dev, | ||
| 127 | struct cpufreq_frequency_table **table) | ||
| 128 | { | ||
| 129 | return -EINVAL; | ||
| 130 | } | ||
| 131 | |||
| 132 | static inline | ||
| 133 | void dev_pm_opp_free_cpufreq_table(struct device *dev, | ||
| 134 | struct cpufreq_frequency_table **table) | ||
| 135 | { | ||
| 136 | } | ||
| 137 | #endif /* CONFIG_CPU_FREQ */ | ||
| 138 | |||
| 139 | #endif /* __LINUX_OPP_H__ */ | 119 | #endif /* __LINUX_OPP_H__ */ |
