aboutsummaryrefslogtreecommitdiffstats
path: root/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpufreq.c')
-rw-r--r--cpufreq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpufreq.c b/cpufreq.c
index 842ef2c..ffe0269 100644
--- a/cpufreq.c
+++ b/cpufreq.c
@@ -69,3 +69,11 @@ int cpufreq_set_long_int(char *parameter,long int value,long int checkdelay)
snprintf(buf,255,"%ld",value);
return cpufreq_set_str(parameter,buf,checkdelay);
}
+
+long int cpufreq_get_long_int(char *parameter)
+{
+ char sysfs_file[128];
+ sprintf(sysfs_file,"/sys/devices/system/cpu/%s/cpufreq/%s",cpudata.cpulist[0],parameter);
+ return sysfs_read_long_int(sysfs_file);
+}
+