brightness_mode val is used BRIGHTNESS_MODE enum defined
authorxxx <xxx@rock-chips.com>
Tue, 29 Jan 2013 10:13:03 +0000 (18:13 +0800)
committerxxx <xxx@rock-chips.com>
Tue, 29 Jan 2013 10:13:03 +0000 (18:13 +0800)
arch/arm/mach-rk30/board-rk3168-tb.c
arch/arm/plat-rk/include/plat/board.h
drivers/video/backlight/rk29_backlight.c

index 42c7046cc415e29b6ed4b24dc6067b1c3c477d14..91e90378679078745cf614cb16747bc7ec52031d 100755 (executable)
@@ -198,7 +198,7 @@ static struct rk29_bl_info rk29_bl_info = {
        .pwm_id = PWM_ID,
        .min_brightness=20,
        .max_brightness=255,
-       .brightness_mode =1,
+       .brightness_mode =BRIGHTNESS_MODE_CONIC,
        .bl_ref = PWM_EFFECT_VALUE,
        .io_init = rk29_backlight_io_init,
        .io_deinit = rk29_backlight_io_deinit,
index 520ff55ef807179ddbef2e598c18c2398271817a..8c04bd7f4391e5f4f7a94ec9916f0053dd581d23 100755 (executable)
@@ -56,6 +56,12 @@ struct rk29xx_spi_platform_data {
        u16 num_chipselect;
 };
 
+enum {
+       BRIGHTNESS_MODE_LINE=0,
+       BRIGHTNESS_MODE_CONIC =1,
+};
+
+
 struct rk29_bl_info {
        u32 pwm_id;
        u32 bl_ref;
index 67cecf3dba4404338e09260ec8421a93375f791a..d2e2e741d3ca76ac478a434805f903070df031af 100755 (executable)
@@ -159,7 +159,7 @@ static int rk29_bl_update_status(struct backlight_device *bl)
        brightness = bl->props.brightness;
 
        
-       if(!rk29_bl_info->brightness_mode)
+       if(rk29_bl_info->brightness_mode==BRIGHTNESS_MODE_LINE)
                brightness=rk29_bl_val_scalor_line(rk29_bl_info,brightness);
        else
                brightness=rk29_bl_val_scalor_conic(rk29_bl_info,brightness);