diff options
author | Colin Cross <ccross@android.com> | 2012-05-07 16:55:45 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-07 16:55:45 -0700 |
commit | 1d775c3af9983ac38e1f1587edd1ec398851b937 (patch) | |
tree | accf53fe41c3276f3dd5b914a29ad6b31e50336e | |
parent | 7273ec24263af92c1c356f15fdd90fe977e143d1 (diff) | |
parent | 835332a3cc273324b102bf4b5973f073b06fce93 (diff) | |
download | device_samsung_tuna-1d775c3af9983ac38e1f1587edd1ec398851b937.zip device_samsung_tuna-1d775c3af9983ac38e1f1587edd1ec398851b937.tar.gz device_samsung_tuna-1d775c3af9983ac38e1f1587edd1ec398851b937.tar.bz2 |
Merge "tuna: remove triggering suspend from power hal" into jb-dev
-rw-r--r-- | power/power_tuna.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/power/power_tuna.c b/power/power_tuna.c index d89249b..2eb580f 100644 --- a/power/power_tuna.c +++ b/power/power_tuna.c @@ -25,15 +25,6 @@ #include <hardware/hardware.h> #include <hardware/power.h> -/* - * Tuna uses the legacy interface for requesting early suspend and late resume. - */ - -#define LEGACY_SYS_POWER_STATE "/sys/power/state" - -static int sPowerStatefd; -static const char *pwr_states[] = { "mem", "on" }; - static void sysfs_write(char *path, char *s) { char buf[80]; @@ -57,15 +48,6 @@ static void sysfs_write(char *path, char *s) static void tuna_power_init(struct power_module *module) { - char buf[80]; - - sPowerStatefd = open(LEGACY_SYS_POWER_STATE, O_RDWR); - - if (sPowerStatefd < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error opening %s: %s\n", LEGACY_SYS_POWER_STATE, buf); - } - /* * cpufreq interactive governor: timer 20ms, min sample 60ms, * hispeed 700MHz at load 50%, input boost enabled. @@ -86,9 +68,6 @@ static void tuna_power_init(struct power_module *module) static void tuna_power_set_interactive(struct power_module *module, int on) { - char buf[80]; - int len; - /* * Lower maximum frequency when screen is off. CPU 0 and 1 share a * cpufreq policy. @@ -96,12 +75,6 @@ static void tuna_power_set_interactive(struct power_module *module, int on) sysfs_write("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", on ? "1200000" : "700000"); - - len = write(sPowerStatefd, pwr_states[!!on], strlen(pwr_states[!!on])); - if (len < 0) { - strerror_r(errno, buf, sizeof(buf)); - ALOGE("Error writing to %s: %s\n", LEGACY_SYS_POWER_STATE, buf); - } } static void tuna_power_hint(struct power_module *module, power_hint_t hint, |