Fix OEM_sys_get_backlight_brightness_by_lux() parameter tizen_2.1 2.1b_release 2.2_release accepted/tizen_2.1/20130425.004027 submit/tizen_2.1/20130424.222442 submit/tizen_2.2/20130714.135930 submit/tizen_2.2/20130714.144610
authorDonghwa Lee <dh09.lee@samsung.com>
Wed, 20 Mar 2013 04:16:18 +0000 (13:16 +0900)
committerDonghwa Lee <dh09.lee@samsung.com>
Wed, 20 Mar 2013 04:16:18 +0000 (13:16 +0900)
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>
include/devman_plugin_intf.h
src/device_manager_plugin_exynos.c

index 06c9cac..ff7492f 100644 (file)
@@ -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;
 
index cba138d..826a9c5 100644 (file)
@@ -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)