summaryrefslogtreecommitdiff
path: root/firmware/target/mips
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-16 11:41:48 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-16 11:41:48 +0000
commit143f62e8cc2404cf6b208caca795d5b31477dd60 (patch)
tree8b7a29456150f136058c44510f7f7e21985f2f51 /firmware/target/mips
parentd6ad019af3ebb38a026821f7c34fe1c8818f14e6 (diff)
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
Diffstat (limited to 'firmware/target/mips')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx747/backlight-onda_vx7X7.c11
1 files changed, 2 insertions, 9 deletions
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;
}