summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsbrissen <sbrissen@hotmail.com>2013-06-21 09:06:37 -0400
committersbrissen <sbrissen@hotmail.com>2013-06-21 09:08:25 -0400
commit6b226ad645e0b8f9cd2b2fb7fd7eecc0ed7a86d1 (patch)
treec4323af640329937d2b1b34ad8ff712c629c7816
parent41e1d1a242bf7e18ee1be590a873237bd3e77977 (diff)
downloadhardware_samsung-6b226ad645e0b8f9cd2b2fb7fd7eecc0ed7a86d1.zip
hardware_samsung-6b226ad645e0b8f9cd2b2fb7fd7eecc0ed7a86d1.tar.gz
hardware_samsung-6b226ad645e0b8f9cd2b2fb7fd7eecc0ed7a86d1.tar.bz2
Exynos4x12: liblights: ifdef exynos4x12 tabs
Change-Id: I3461a6569bf7d3c65e72cc911282bb3ee8e52bc5
-rw-r--r--exynos4/exynos4x12/liblights/lights.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/exynos4/exynos4x12/liblights/lights.c b/exynos4/exynos4x12/liblights/lights.c
index 99900ea..ec917c1 100644
--- a/exynos4/exynos4x12/liblights/lights.c
+++ b/exynos4/exynos4x12/liblights/lights.c
@@ -40,6 +40,7 @@ static pthread_once_t g_init = PTHREAD_ONCE_INIT;
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
char const*const PANEL_FILE = "/sys/class/backlight/panel/brightness";
+#ifndef EXYNOS4X12_TABLET
char const*const BUTTON_FILE = "/sys/class/sec/sec_touchkey/brightness";
char const*const LED_RED = "/sys/class/sec/led/led_r";
@@ -47,6 +48,7 @@ char const*const LED_GREEN = "/sys/class/sec/led/led_g";
char const*const LED_BLUE = "/sys/class/sec/led/led_b";
char const*const LED_BLINK = "/sys/class/sec/led/led_blink";
char const*const LED_BRIGHTNESS = "/sys/class/sec/led/led_br_lev";
+#endif
#define MAX_WRITE_CMD 25
@@ -156,9 +158,12 @@ static int set_light_backlight(struct light_device_t *dev,
pthread_mutex_lock(&g_lock);
err = write_int(PANEL_FILE, brightness);
+
+#ifndef EXYNOS4X12_TABLET
if (!previous_brightness && (brightness > 0)) {
err = write_int(BUTTON_FILE, brightness > 0 ? 1 : 2);
}
+#endif
pthread_mutex_unlock(&g_lock);
return err;
@@ -177,19 +182,23 @@ static int close_lights(struct light_device_t *dev)
static int write_leds(struct led_config led)
{
int err = 0;
-
+#ifndef EXYNOS4X12_TABLET
pthread_mutex_lock(&g_lock);
err = write_int(LED_RED, led.red);
err = write_int(LED_GREEN, led.green);
err = write_int(LED_BLUE, led.blue);
err = write_str(LED_BLINK, led.blink);
pthread_mutex_unlock(&g_lock);
-
+#endif
return err;
}
static int set_light_leds(struct light_state_t const *state, int type)
{
+#ifdef EXYNOS4X12_TABLET
+ return 0;
+#else
+
struct led_config led;
unsigned int colorRGB;
@@ -219,6 +228,7 @@ static int set_light_leds(struct light_state_t const *state, int type)
}
return write_leds(led);
+#endif
}
static int set_light_leds_notifications(struct light_device_t *dev,
@@ -230,6 +240,9 @@ static int set_light_leds_notifications(struct light_device_t *dev,
static int set_light_battery(struct light_device_t *dev,
struct light_state_t const *state)
{
+#ifdef EXYNOS4X12_TABLET
+ return 0;
+#else
struct led_config led;
int brightness = rgb_to_brightness(state);
unsigned int colorRGB;
@@ -251,6 +264,7 @@ static int set_light_battery(struct light_device_t *dev,
g_BatteryStore = led;
return write_leds(led);
+#endif
}
static int set_light_leds_attention(struct light_device_t *dev,