summaryrefslogtreecommitdiff
path: root/power-8952.c
diff options
context:
space:
mode:
Diffstat (limited to 'power-8952.c')
-rw-r--r--power-8952.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/power-8952.c b/power-8952.c
index 1e29c4a..f77843b 100644
--- a/power-8952.c
+++ b/power-8952.c
@@ -58,8 +58,6 @@ static int video_encode_hint_sent;
pthread_mutex_t camera_hint_mutex = PTHREAD_MUTEX_INITIALIZER;
static int camera_hint_ref_count;
static void process_video_encode_hint(void *metadata);
-static int display_fd;
-#define SYS_DISPLAY_PWR "/sys/kernel/hbtp/display_pwr"
static bool is_target_SDM439() /* Returns value=1 if target is Hathi else value 0 */
{
@@ -103,13 +101,6 @@ int set_interactive_override(struct power_module *module, int on)
char governor[80];
char tmp_str[NODE_MAX];
struct video_encode_metadata_t video_encode_metadata;
- int rc = 0;
-
- 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;
ALOGI("Got set_interactive hint");
@@ -150,39 +141,6 @@ int set_interactive_override(struct power_module *module, int on)
}
saved_interactive_mode = !!on;
- 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);
- return HINT_HANDLED;
- }
- 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;
}