Commit 0c868627 authored by Peng Fan's avatar Peng Fan Committed by Viresh Kumar

cpufreq: dt: Allow platform specific intermediate callbacks

Platforms may need to implement platform specific get_intermediate and
target_intermediate hooks.

Update cpufreq-dt driver's platform data to contain those for such
platforms.
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent c9833044
...@@ -363,6 +363,10 @@ static int dt_cpufreq_probe(struct platform_device *pdev) ...@@ -363,6 +363,10 @@ static int dt_cpufreq_probe(struct platform_device *pdev)
dt_cpufreq_driver.resume = data->resume; dt_cpufreq_driver.resume = data->resume;
if (data->suspend) if (data->suspend)
dt_cpufreq_driver.suspend = data->suspend; dt_cpufreq_driver.suspend = data->suspend;
if (data->get_intermediate) {
dt_cpufreq_driver.target_intermediate = data->target_intermediate;
dt_cpufreq_driver.get_intermediate = data->get_intermediate;
}
} }
ret = cpufreq_register_driver(&dt_cpufreq_driver); ret = cpufreq_register_driver(&dt_cpufreq_driver);
......
...@@ -14,6 +14,10 @@ struct cpufreq_policy; ...@@ -14,6 +14,10 @@ struct cpufreq_policy;
struct cpufreq_dt_platform_data { struct cpufreq_dt_platform_data {
bool have_governor_per_policy; bool have_governor_per_policy;
unsigned int (*get_intermediate)(struct cpufreq_policy *policy,
unsigned int index);
int (*target_intermediate)(struct cpufreq_policy *policy,
unsigned int index);
int (*suspend)(struct cpufreq_policy *policy); int (*suspend)(struct cpufreq_policy *policy);
int (*resume)(struct cpufreq_policy *policy); int (*resume)(struct cpufreq_policy *policy);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment