summaryrefslogtreecommitdiff
path: root/power-845.c
diff options
context:
space:
mode:
Diffstat (limited to 'power-845.c')
-rw-r--r--power-845.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/power-845.c b/power-845.c
index 9248f38..dbe08ac 100644
--- a/power-845.c
+++ b/power-845.c
@@ -51,9 +51,6 @@
#include "performance.h"
#include "power-common.h"
-static int display_fd;
-#define SYS_DISPLAY_PWR "/sys/kernel/hbtp/display_pwr"
-
#define CHECK_HANDLE(x) ((x)>0)
#define NUM_PERF_MODES 3
@@ -228,47 +225,3 @@ int power_hint_override(struct power_module *module, power_hint_t hint, void *da
}
return ret_val;
}
-
-int set_interactive_override(struct power_module *module, int on)
-{
- static const char *display_on = "1";
- static const char *display_off = "0";
- char err_buf[80];
- static int init_interactive_hint = 0;
- static int set_i_count = 0;
- int rc = 0;
-
- set_i_count ++;
- ALOGI("Got set_interactive hint on= %d, count= %d\n", on, set_i_count);
-
- if (init_interactive_hint == 0)
- {
- //First time the display is turned off
- display_fd = TEMP_FAILURE_RETRY(open(SYS_DISPLAY_PWR, O_RDWR));
- if (display_fd < 0) {
- strerror_r(errno,err_buf,sizeof(err_buf));
- ALOGE("Error opening %s: %s\n", SYS_DISPLAY_PWR, err_buf);
- }
- else
- init_interactive_hint = 1;
- }
- else
- if (!on ) {
- /* Display off. */
- rc = TEMP_FAILURE_RETRY(write(display_fd, display_off, strlen(display_off)));
- if (rc < 0) {
- strerror_r(errno,err_buf,sizeof(err_buf));
- ALOGE("Error writing %s to %s: %s\n", display_off, SYS_DISPLAY_PWR, err_buf);
- }
- }
- else {
- /* Display on */
- rc = TEMP_FAILURE_RETRY(write(display_fd, display_on, strlen(display_on)));
- if (rc < 0) {
- strerror_r(errno,err_buf,sizeof(err_buf));
- ALOGE("Error writing %s to %s: %s\n", display_on, SYS_DISPLAY_PWR, err_buf);
- }
- }
-
- return HINT_HANDLED; /* Don't excecute this code path, not in use */
-}