diff options
author | Donggeun Kim <dg77.kim@samsung.com> | 2011-07-19 01:41:57 -0400 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2011-10-26 17:19:45 -0400 |
commit | 5beae3b9b6f5479998310a849f73aa32a637dd3b (patch) | |
tree | 4e2ff681b95d117e996faad58f9bbdcab5b29ad3 /drivers/cpufreq | |
parent | 138c4ae9cfda8fdcf9e137457853b09ef8cf8f77 (diff) |
[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>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/exynos4210-cpufreq.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/cpufreq/exynos4210-cpufreq.c b/drivers/cpufreq/exynos4210-cpufreq.c index b7c3a84c4cfa..6f887573ce94 100644 --- a/drivers/cpufreq/exynos4210-cpufreq.c +++ b/drivers/cpufreq/exynos4210-cpufreq.c | |||
@@ -464,6 +464,8 @@ static int exynos4_cpufreq_resume(struct cpufreq_policy *policy) | |||
464 | 464 | ||
465 | static int exynos4_cpufreq_cpu_init(struct cpufreq_policy *policy) | 465 | static int exynos4_cpufreq_cpu_init(struct cpufreq_policy *policy) |
466 | { | 466 | { |
467 | int ret; | ||
468 | |||
467 | policy->cur = policy->min = policy->max = exynos4_getspeed(policy->cpu); | 469 | policy->cur = policy->min = policy->max = exynos4_getspeed(policy->cpu); |
468 | 470 | ||
469 | cpufreq_frequency_table_get_attr(exynos4_freq_table, policy->cpu); | 471 | cpufreq_frequency_table_get_attr(exynos4_freq_table, policy->cpu); |
@@ -479,16 +481,35 @@ static int exynos4_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
479 | */ | 481 | */ |
480 | cpumask_setall(policy->cpus); | 482 | cpumask_setall(policy->cpus); |
481 | 483 | ||
482 | return cpufreq_frequency_table_cpuinfo(policy, exynos4_freq_table); | 484 | ret = cpufreq_frequency_table_cpuinfo(policy, exynos4_freq_table); |
485 | if (ret) | ||
486 | return ret; | ||
487 | |||
488 | cpufreq_frequency_table_get_attr(exynos4_freq_table, policy->cpu); | ||
489 | |||
490 | return 0; | ||
483 | } | 491 | } |
484 | 492 | ||
493 | static int exynos4_cpufreq_cpu_exit(struct cpufreq_policy *policy) | ||
494 | { | ||
495 | cpufreq_frequency_table_put_attr(policy->cpu); | ||
496 | return 0; | ||
497 | } | ||
498 | |||
499 | static struct freq_attr *exynos4_cpufreq_attr[] = { | ||
500 | &cpufreq_freq_attr_scaling_available_freqs, | ||
501 | NULL, | ||
502 | }; | ||
503 | |||
485 | static struct cpufreq_driver exynos4_driver = { | 504 | static struct cpufreq_driver exynos4_driver = { |
486 | .flags = CPUFREQ_STICKY, | 505 | .flags = CPUFREQ_STICKY, |
487 | .verify = exynos4_verify_speed, | 506 | .verify = exynos4_verify_speed, |
488 | .target = exynos4_target, | 507 | .target = exynos4_target, |
489 | .get = exynos4_getspeed, | 508 | .get = exynos4_getspeed, |
490 | .init = exynos4_cpufreq_cpu_init, | 509 | .init = exynos4_cpufreq_cpu_init, |
510 | .exit = exynos4_cpufreq_cpu_exit, | ||
491 | .name = "exynos4_cpufreq", | 511 | .name = "exynos4_cpufreq", |
512 | .attr = exynos4_cpufreq_attr, | ||
492 | #ifdef CONFIG_PM | 513 | #ifdef CONFIG_PM |
493 | .suspend = exynos4_cpufreq_suspend, | 514 | .suspend = exynos4_cpufreq_suspend, |
494 | .resume = exynos4_cpufreq_resume, | 515 | .resume = exynos4_cpufreq_resume, |