mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
cpufreq: dt: Implement rockchip_cpufreq_suspend()
Set CPU voltage to low temperature voltage before system suspend, so that it can resume successfully at low temperature. Change-Id: Ib9ab16558ff69ea80e862473ef9ec6bfa7cd61ad Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
@@ -409,6 +409,18 @@ static void cpufreq_ready(struct cpufreq_policy *policy)
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static int rockchip_cpufreq_suspend(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct private_data *priv = policy->driver_data;
|
||||
int ret = 0;
|
||||
|
||||
ret = cpufreq_generic_suspend(policy);
|
||||
if (!ret)
|
||||
rockchip_cpu_suspend_low_temp_adjust(priv->opp_info);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct cpufreq_driver dt_cpufreq_driver = {
|
||||
.flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK |
|
||||
CPUFREQ_HAVE_GOVERNOR_PER_POLICY,
|
||||
@@ -420,7 +432,11 @@ static struct cpufreq_driver dt_cpufreq_driver = {
|
||||
.ready = cpufreq_ready,
|
||||
.name = "cpufreq-dt",
|
||||
.attr = cpufreq_dt_attr,
|
||||
#ifdef CONFIG_ARCH_ROCKCHIP
|
||||
.suspend = rockchip_cpufreq_suspend,
|
||||
#else
|
||||
.suspend = cpufreq_generic_suspend,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int dt_cpufreq_probe(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user