[CPUFREQ] exynos4210: Show list of available frequencies
This patch enables 'scaling_available_frequencies' attribute showing list of available frequencies. Signed-off-by: Donggeun Kim <dg77.kim@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
138c4ae9cf
commit
5beae3b9b6
1 changed files with 22 additions and 1 deletions
|
@ -464,6 +464,8 @@ static int exynos4_cpufreq_resume(struct cpufreq_policy *policy)
|
||||||
|
|
||||||
static int exynos4_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
static int exynos4_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
|
|
||||||
policy->cur = policy->min = policy->max = exynos4_getspeed(policy->cpu);
|
policy->cur = policy->min = policy->max = exynos4_getspeed(policy->cpu);
|
||||||
|
|
||||||
cpufreq_frequency_table_get_attr(exynos4_freq_table, policy->cpu);
|
cpufreq_frequency_table_get_attr(exynos4_freq_table, policy->cpu);
|
||||||
|
@ -479,16 +481,35 @@ static int exynos4_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
*/
|
*/
|
||||||
cpumask_setall(policy->cpus);
|
cpumask_setall(policy->cpus);
|
||||||
|
|
||||||
return cpufreq_frequency_table_cpuinfo(policy, exynos4_freq_table);
|
ret = cpufreq_frequency_table_cpuinfo(policy, exynos4_freq_table);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
cpufreq_frequency_table_get_attr(exynos4_freq_table, policy->cpu);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int exynos4_cpufreq_cpu_exit(struct cpufreq_policy *policy)
|
||||||
|
{
|
||||||
|
cpufreq_frequency_table_put_attr(policy->cpu);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct freq_attr *exynos4_cpufreq_attr[] = {
|
||||||
|
&cpufreq_freq_attr_scaling_available_freqs,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
static struct cpufreq_driver exynos4_driver = {
|
static struct cpufreq_driver exynos4_driver = {
|
||||||
.flags = CPUFREQ_STICKY,
|
.flags = CPUFREQ_STICKY,
|
||||||
.verify = exynos4_verify_speed,
|
.verify = exynos4_verify_speed,
|
||||||
.target = exynos4_target,
|
.target = exynos4_target,
|
||||||
.get = exynos4_getspeed,
|
.get = exynos4_getspeed,
|
||||||
.init = exynos4_cpufreq_cpu_init,
|
.init = exynos4_cpufreq_cpu_init,
|
||||||
|
.exit = exynos4_cpufreq_cpu_exit,
|
||||||
.name = "exynos4_cpufreq",
|
.name = "exynos4_cpufreq",
|
||||||
|
.attr = exynos4_cpufreq_attr,
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.suspend = exynos4_cpufreq_suspend,
|
.suspend = exynos4_cpufreq_suspend,
|
||||||
.resume = exynos4_cpufreq_resume,
|
.resume = exynos4_cpufreq_resume,
|
||||||
|
|
Loading…
Add table
Reference in a new issue