Skip to content

Commit c956541

Browse files
marcanvireshk
authored andcommitted
cpufreq: apple-soc: Switch to the lowest frequency on suspend
Without this, the CPUs are left in a random pstate. Since we don't support deep idle yet (which powers down the CPUs), this results in significantly increased idle power consumption in suspend. Fixes: 6286bbb ("cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states") Signed-off-by: Hector Martin <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 53cd37c commit c956541

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/cpufreq/apple-soc-cpufreq.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
280280
policy->cpuinfo.transition_latency = transition_latency;
281281
policy->dvfs_possible_from_any_cpu = true;
282282
policy->fast_switch_possible = true;
283+
policy->suspend_freq = freq_table[0].frequency;
283284

284285
if (policy_has_boost_freq(policy)) {
285286
ret = cpufreq_enable_boost_support();
@@ -328,6 +329,7 @@ static struct cpufreq_driver apple_soc_cpufreq_driver = {
328329
.fast_switch = apple_soc_cpufreq_fast_switch,
329330
.register_em = cpufreq_register_em_with_opp,
330331
.attr = apple_soc_cpufreq_hw_attr,
332+
.suspend = cpufreq_generic_suspend,
331333
};
332334

333335
static int __init apple_soc_cpufreq_module_init(void)

0 commit comments

Comments
 (0)