Skip to content

Commit

Permalink
[CPUFREQ] S3C64xx: Notify transition complete as soon as frequency ch…
Browse files Browse the repository at this point in the history
…anged

The CPUFREQ_POSTCHANGE notification is used to update things that depend on
the system clock rates. Since this may include the interfaces used to talk
to the regulators do the notification before we try to update regulators
to reflect lowered system clock rate.

The voltage scaling is just a power optimisation and may not happen at all
so there's no concern about it not having completed.

Signed-off-by: Mark Brown <[email protected]>
Acked-by: Kukjin Kim <[email protected]>
Signed-off-by: Dave Jones <[email protected]>
  • Loading branch information
broonie authored and Dave Jones committed Jul 13, 2011
1 parent c6e2d68 commit fb3b1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/cpufreq/s3c64xx-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
goto err;
}

cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);

#ifdef CONFIG_REGULATOR
if (vddarm && freqs.new < freqs.old) {
ret = regulator_set_voltage(vddarm,
Expand All @@ -125,8 +127,6 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
}
#endif

cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);

pr_debug("cpufreq: Set actual frequency %lukHz\n",
clk_get_rate(armclk) / 1000);

Expand Down

0 comments on commit fb3b1fe

Please sign in to comment.