summaryrefslogtreecommitdiffstats
path: root/power
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-05-03 17:29:04 -0700
committerColin Cross <ccross@android.com>2012-05-03 19:01:00 -0700
commit835332a3cc273324b102bf4b5973f073b06fce93 (patch)
treeaccf53fe41c3276f3dd5b914a29ad6b31e50336e /power
parent8f7baeaf610547034cbbef30c7cc2e663a67218f (diff)
downloaddevice_samsung_tuna-835332a3cc273324b102bf4b5973f073b06fce93.zip
device_samsung_tuna-835332a3cc273324b102bf4b5973f073b06fce93.tar.gz
device_samsung_tuna-835332a3cc273324b102bf4b5973f073b06fce93.tar.bz2
tuna: remove triggering suspend from power hal
PowerManagerService will trigger suspend after calling into the power hal, remove it from here. Change-Id: I9c6bc42f8615d047000295fb8b100e32c4e46318
Diffstat (limited to 'power')
-rw-r--r--power/power_tuna.c27
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,