mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
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: Peng Fan <peng.fan@nxp.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
parent
c98330446c
commit
0c868627e6
@ -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;
|
|||||||
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);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user