power: Remove HBTP support
* Not used
Change-Id: Ib8e9f51fe92c0bce8cde3ee7c7960c1dac740d35
diff --git a/power-710.c b/power-710.c
index 034a19c..1c78d83 100644
--- a/power-710.c
+++ b/power-710.c
@@ -49,49 +49,13 @@
#include "performance.h"
#include "power-common.h"
-static int display_fd;
-#define SYS_DISPLAY_PWR "/sys/kernel/hbtp/display_pwr"
-
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 */
}
diff --git a/power-845.c b/power-845.c
index 9248f38..2976c78 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
@@ -231,44 +228,11 @@
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 */
}
diff --git a/power-8937.c b/power-8937.c
index 1e29c4a..d3fbd44 100644
--- a/power-8937.c
+++ b/power-8937.c
@@ -58,8 +58,6 @@
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,12 +101,6 @@
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");
@@ -153,36 +145,6 @@
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;
}
diff --git a/power-8953.c b/power-8953.c
index d0750e4..dfd5510 100644
--- a/power-8953.c
+++ b/power-8953.c
@@ -62,9 +62,6 @@
static void process_video_encode_hint(void *metadata);
//static void process_cam_preview_hint(void *metadata);
-static int display_fd;
-#define SYS_DISPLAY_PWR "/sys/kernel/hbtp/display_pwr"
-
static bool is_target_SDM632() /* Returns value=632 if target is SDM632 else value 0 */
{
int fd;
@@ -107,12 +104,6 @@
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");
@@ -156,36 +147,6 @@
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;
}
diff --git a/power-msmnile.c b/power-msmnile.c
index 7000079..bf3729f 100644
--- a/power-msmnile.c
+++ b/power-msmnile.c
@@ -45,49 +45,13 @@
#include "power-common.h"
-static int display_fd;
-#define SYS_DISPLAY_PWR "/sys/kernel/hbtp/display_pwr"
-
int set_interactive_override(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;
}