1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
From 99ce90618a47cdc8c373838b7ee04348cc21d303 Mon Sep 17 00:00:00 2001
From: Thibaut Girka <thib@sitedethib.com>
Date: Wed, 21 Jul 2010 09:40:29 +0200
Subject: [PATCH 16/23] jbt6k74: fix WS
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
drivers/video/backlight/jbt6k74.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/video/backlight/jbt6k74.c b/drivers/video/backlight/jbt6k74.c
index 56a3e3a..4db021f 100644
--- a/drivers/video/backlight/jbt6k74.c
+++ b/drivers/video/backlight/jbt6k74.c
@@ -268,8 +268,7 @@ static int jbt_off_to_normal(struct jbt_info *jbt)
gpio_set_value_cansleep(pdata->gpio_reset, 1);
ret = regulator_bulk_enable(ARRAY_SIZE(jbt->supplies), jbt->supplies);
-
- mdelay(120);
+ mdelay(200);
/* three times command zero */
ret |= jbt_reg_write_nodata(jbt, 0x00);
@@ -282,10 +281,16 @@ static int jbt_off_to_normal(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);
+
/* Make sure we are 120 ms after SLEEP_OUT */
if (time_before(jiffies, jbt->next_sleep))
@@ -644,7 +649,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:
@@ -658,7 +663,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 = jbt6k74_enter_power_mode(jbt, JBT_POWER_MODE_OFF);
+ //ret = schedule_delayed_work(&jbt->blank_work, HZ);
+ jbt6k74_enter_power_mode(jbt, JBT_POWER_MODE_OFF);
+ ret = 1;
break;
default:
break;
--
1.7.1.1
|