From 143f62e8cc2404cf6b208caca795d5b31477dd60 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Tue, 16 Jun 2009 11:41:48 +0000 Subject: Onda VX747: fix backlight driver so it doesn't 'flicker' upon init git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21310 a1c6a512-1295-4272-9138-f99709370657 --- .../mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'firmware/target/mips/ingenic_jz47xx') diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c b/firmware/target/mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c index f2ef3f7dc1..e59f1812c1 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c @@ -35,9 +35,6 @@ static int old_val; static void set_backlight(int val) { - if(val == old_val) - return; - /* The pulse repetition frequency should be greater than 100Hz so the flickering is not perceptible to the human eye but not greater than about 1kHz. */ @@ -62,15 +59,12 @@ static void set_backlight(int val) static void set_backlight_on(void) { set_backlight(old_val); - - __tcu_enable_pwm_output(BACKLIGHT_PWM); - __tcu_start_counter(BACKLIGHT_PWM); } static void set_backlight_off(void) { - __tcu_stop_counter(BACKLIGHT_PWM); __tcu_disable_pwm_output(BACKLIGHT_PWM); + __tcu_stop_counter(BACKLIGHT_PWM); } bool _backlight_init(void) @@ -81,7 +75,7 @@ bool _backlight_init(void) __tcu_stop_counter(BACKLIGHT_PWM); __tcu_init_pwm_output_low(BACKLIGHT_PWM); __tcu_set_pwm_output_shutdown_graceful(BACKLIGHT_PWM); - __tcu_enable_pwm_output(BACKLIGHT_PWM); + __tcu_disable_pwm_output(BACKLIGHT_PWM); __tcu_select_rtcclk(BACKLIGHT_PWM); /* 32.768 kHz */ __tcu_select_clk_div1(BACKLIGHT_PWM); @@ -90,7 +84,6 @@ bool _backlight_init(void) __tcu_mask_full_match_irq(BACKLIGHT_PWM); old_val = MAX_BRIGHTNESS_SETTING; - set_backlight_on(); return true; } -- cgit v1.2.3