summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--power/power_tuna.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/power/power_tuna.c b/power/power_tuna.c
index a544f9a..4562bc1 100644
--- a/power/power_tuna.c
+++ b/power/power_tuna.c
@@ -25,9 +25,10 @@
#include <hardware/hardware.h>
#include <hardware/power.h>
-#define SCALINGMAXFREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq"
-#define SCREENOFFMAXFREQ_PATH "/sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq"
-#define BOOSTPULSE_PATH "/sys/devices/system/cpu/cpufreq/interactive/boostpulse"
+#define CPUFREQ_INTERACTIVE "/sys/devices/system/cpu/cpufreq/interactive/"
+#define CPUFREQ_CPU0 "/sys/devices/system/cpu/cpu0/cpufreq/"
+#define BOOSTPULSE_PATH (CPUFREQ_INTERACTIVE "boostpulse")
+#define SCALINGMAXFREQ_PATH (CPUFREQ_CPU0 "scaling_max_freq")
#define MAX_BUF_SZ 10
@@ -85,18 +86,12 @@ static void tuna_power_init(struct power_module *module)
{
struct tuna_power_module *tuna = (struct tuna_power_module *) module;
- sysfs_write("/sys/devices/system/cpu/cpufreq/interactive/timer_rate",
- "20000");
- sysfs_write("/sys/devices/system/cpu/cpufreq/interactive/min_sample_time",
- "60000");
- sysfs_write("/sys/devices/system/cpu/cpufreq/interactive/hispeed_freq",
- "700000");
- sysfs_write("/sys/devices/system/cpu/cpufreq/interactive/target_loads",
- "70 920000:80 1200000:99");
- sysfs_write("/sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load",
- "99");
- sysfs_write("/sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay",
- "80000");
+ sysfs_write(CPUFREQ_INTERACTIVE "timer_rate", "20000");
+ sysfs_write(CPUFREQ_INTERACTIVE "min_sample_time", "60000");
+ sysfs_write(CPUFREQ_INTERACTIVE "hispeed_freq", "700000");
+ sysfs_write(CPUFREQ_INTERACTIVE "target_loads", "70 920000:80 1200000:99");
+ sysfs_write(CPUFREQ_INTERACTIVE "go_hispeed_load", "99");
+ sysfs_write(CPUFREQ_INTERACTIVE "above_hispeed_delay", "80000");
ALOGI("Initialized successfully");
tuna->inited = 1;