summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonghwa Lee <dh09.lee@samsung.com>2013-03-20 13:16:18 +0900
committerDonghwa Lee <dh09.lee@samsung.com>2013-03-20 13:16:18 +0900
commitd991d04b111afba23e95f20f9c6b6d1b6d3ba6d2 (patch)
treec9412f617ad225e729389131865e12038249321e
parent26d6b5d95161f230164027d5e0a69ac21a2e6b46 (diff)
downloaddevice-manager-plugin-exynos-tizen_2.1.tar.gz
device-manager-plugin-exynos-tizen_2.1.tar.bz2
device-manager-plugin-exynos-tizen_2.1.zip
Fix OEM_sys_get_backlight_brightness_by_lux() function parameter. And unnecessay function code was removed and just return success. Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
-rw-r--r--include/devman_plugin_intf.h2
-rw-r--r--src/device_manager_plugin_exynos.c56
2 files changed, 5 insertions, 53 deletions
diff --git a/include/devman_plugin_intf.h b/include/devman_plugin_intf.h
index 06c9cac..ff7492f 100644
--- a/include/devman_plugin_intf.h
+++ b/include/devman_plugin_intf.h
@@ -159,7 +159,7 @@ typedef struct {
int (*OEM_sys_get_cpufreq_scaling_min_freq) (int *value);
int (*OEM_sys_set_cpufreq_scaling_min_freq) (int value);
- int (*OEM_sys_get_backlight_brightness_by_lux) (int lux, int status);
+ int (*OEM_sys_get_backlight_brightness_by_lux) (int lux, int *value);
} OEM_sys_devman_plugin_interface;
diff --git a/src/device_manager_plugin_exynos.c b/src/device_manager_plugin_exynos.c
index cba138d..826a9c5 100644
--- a/src/device_manager_plugin_exynos.c
+++ b/src/device_manager_plugin_exynos.c
@@ -97,60 +97,12 @@ struct display_info
int lcd_index;
struct display_info disp_info[DISP_MAX];
-int OEM_sys_get_backlight_brightness_by_lux(unsigned int lux, enum lux_status status)
+/* This function is not supported */
+int OEM_sys_get_backlight_brightness_by_lux(unsigned int lux, int *value)
{
- static int brightness = -1;
+ /* TODO */
- if (status == no_change) {
- if (brightness == -1)
- status = increment;
- else
- return brightness;
- }
- if (status == decrement) {
- switch (lux) {
- case 10000 ... 0xffffffff:
- brightness = 100;
- break;
- case 1000 ... 9999:
- brightness = 80;
- break;
- case 75 ... 999:
- brightness = 60;
- break;
- case 7 ... 74:
- brightness = 40;
- break;
- case 0 ... 6:
- brightness = 1;
- break;
- default:
- return -1;
- }
- } else if (status == increment) {
- switch (lux) {
- case 15001 ... 0xffffffff:
- brightness = 100;
- break;
- case 1501 ... 15000:
- brightness = 80;
- break;
- case 151 ... 1500:
- brightness = 60;
- break;
- case 16 ... 150:
- brightness = 40;
- break;
- case 0 ... 15:
- brightness = 1;
- break;
- default:
- return -1;
- }
- } else
- return -1;
-
- return brightness;
+ return 0;
}
static int OEM_sys_display_info(struct display_info *disp_info)