From: xxx Date: Tue, 29 Jan 2013 10:13:03 +0000 (+0800) Subject: brightness_mode val is used BRIGHTNESS_MODE enum defined X-Git-Tag: firefly_0821_release~7702 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=57e95a4846cf8b18349df81573922d4444040ba2;p=firefly-linux-kernel-4.4.55.git brightness_mode val is used BRIGHTNESS_MODE enum defined --- diff --git a/arch/arm/mach-rk30/board-rk3168-tb.c b/arch/arm/mach-rk30/board-rk3168-tb.c index 42c7046cc415..91e903786790 100755 --- a/arch/arm/mach-rk30/board-rk3168-tb.c +++ b/arch/arm/mach-rk30/board-rk3168-tb.c @@ -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, diff --git a/arch/arm/plat-rk/include/plat/board.h b/arch/arm/plat-rk/include/plat/board.h index 520ff55ef807..8c04bd7f4391 100755 --- a/arch/arm/plat-rk/include/plat/board.h +++ b/arch/arm/plat-rk/include/plat/board.h @@ -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; diff --git a/drivers/video/backlight/rk29_backlight.c b/drivers/video/backlight/rk29_backlight.c index 67cecf3dba44..d2e2e741d3ca 100755 --- a/drivers/video/backlight/rk29_backlight.c +++ b/drivers/video/backlight/rk29_backlight.c @@ -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);