Skip to content

Commit

Permalink
Another fix for WS
Browse files Browse the repository at this point in the history
[21:43] <gena2x> radekp: fix WS
[21:43] <gena2x> on blank/unblank and similar (rotating, resume)
[21:44] <gena2x> two patches in face
[21:44] <gena2x> *fact
[21:44] <gena2x> 1. added wait for voltage stabilisation
[21:46] <gena2x> 2. do blanking instantly
[21:46] <gena2x> because of (2) you'll see brief WS while boot/unblank/resume (all unblank situations)
[21:47] <gena2x> 200 is random
  • Loading branch information
ClearlyClaire authored and radekp committed Sep 17, 2010
1 parent 98c3c20 commit b76e120
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions drivers/video/backlight/jbt6k74.c
Expand Up @@ -218,6 +218,8 @@ static int jbt_init_regs(struct jbt_info *jbt)
* to avoid red / blue flicker
*/
ret |= jbt_reg_write(jbt, JBT_REG_ASW_SLEW, 0x00 | (1 << 5));
//ret |= jbt_reg_write(jbt, JBT_REG_ASW_SLEW, 0x02);

ret |= jbt_reg_write(jbt, JBT_REG_DUMMY_DISPLAY, 0x00);

ret |= jbt_reg_write(jbt, JBT_REG_SLEEP_OUT_FR_A, 0x11);
Expand Down Expand Up @@ -267,6 +269,7 @@ static int jbt_standby_to_sleep(struct jbt_info *jbt)

gpio_set_value_cansleep(pdata->gpio_reset, 1);
ret = regulator_bulk_enable(ARRAY_SIZE(jbt->supplies), jbt->supplies);
mdelay (200);

/* three times command zero */
ret |= jbt_reg_write_nodata(jbt, 0x00);
Expand All @@ -279,11 +282,17 @@ static int jbt_standby_to_sleep(struct jbt_info *jbt)
/* deep standby out */
ret |= jbt_reg_write(jbt, JBT_REG_POWER_ON_OFF, 0x11);
mdelay(1);
if (ret != 0)
printk (KERN_ERR "Ignored ret value:%i",ret);

ret = jbt_reg_write(jbt, JBT_REG_DISPLAY_MODE, 0x28);

/* (re)initialize register set */
ret |= jbt_init_regs(jbt);

if (ret != 0)
printk (KERN_ERR "Ignored ret value2:%i",ret);

return ret ? -EIO : 0;
}

Expand Down Expand Up @@ -627,7 +636,7 @@ static void jbt_blank_worker(struct work_struct *work)
blank_work.work);

switch (jbt->blank_mode) {
case FB_BLANK_NORMAL:
case FB_BLANK_NORMAL:
jbt6k74_enter_power_mode(jbt, JBT_POWER_MODE_SLEEP);
break;
case FB_BLANK_POWERDOWN:
Expand Down Expand Up @@ -661,7 +670,7 @@ static int jbt6k74_set_power(struct lcd_device *ld, int power)
struct jbt_info *jbt = dev_get_drvdata(&ld->dev);

jbt->blank_mode = power;
cancel_rearming_delayed_work(&jbt->blank_work);
//cancel_rearming_delayed_work(&jbt->blank_work);

switch (power) {
case FB_BLANK_UNBLANK:
Expand All @@ -675,7 +684,9 @@ static int jbt6k74_set_power(struct lcd_device *ld, int power)
break;
case FB_BLANK_POWERDOWN:
dev_dbg(&jbt->spi->dev, "powerdown\n");
ret = schedule_delayed_work(&jbt->blank_work, HZ);
//ret = schedule_delayed_work(&jbt->blank_work, HZ);
jbt6k74_enter_power_mode(jbt, JBT_POWER_MODE_DEEP_STANDBY);
ret = 1;
break;
default:
break;
Expand Down

0 comments on commit b76e120

Please sign in to comment.