]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00231104 i.MX cpufreq: add scaling_available_freqs attribute
authorLin Fuzhen <fuzhen.lin@freescale.com>
Thu, 25 Oct 2012 06:19:24 +0000 (14:19 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:37 +0000 (08:35 +0200)
Add scaling_available_freqs attribute in cpufreq for i.MX
can get cpufreq table info with:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
996000 792000 396000

Signed-off-by: Lin Fuzhen <fuzhen.lin@freescale.com>
arch/arm/plat-mxc/cpufreq.c

index cc26b7adbc766ca6c561394fe8960ea283b5f137..e6dc591d46af050ebca5ae8d1d0f5425f7d70969 100755 (executable)
@@ -388,6 +388,10 @@ static int mxc_cpufreq_exit(struct cpufreq_policy *policy)
        return 0;
 }
 
+static struct freq_attr *imx_cpufreq_attr[] = {
+       &cpufreq_freq_attr_scaling_available_freqs,
+       NULL,
+};
 static struct cpufreq_driver mxc_driver = {
        .flags = CPUFREQ_STICKY,
        .verify = mxc_verify_speed,
@@ -400,6 +404,7 @@ static struct cpufreq_driver mxc_driver = {
        .resume = mxc_cpufreq_resume,
 #endif
        .name = "imx",
+       .attr = imx_cpufreq_attr,
 };
 
 extern void mx6_cpu_regulator_init(void);