aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.24/1189-change-lcm-keep-power-faster-resume.patch.patch
blob: ef648f2da5b73376a446f93db8e17d33ce650132 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
From 897135bb5ce881419ee6e7c97875293b3e74330c Mon Sep 17 00:00:00 2001
From: Andy Green <andy@openmoko.com>
Date: Wed, 2 Jul 2008 22:40:28 +0100
Subject: [PATCH] change-lcm-keep-power-faster-resume.patch

The LCM spins for 100ms during resume for not much reason.  Leave it powered
(it is meant to pull uA when suspended) and get nice fast resume to video.

Signed-off-by: Andy Green <andy@openmoko.com>
---
 arch/arm/mach-s3c2440/mach-gta02.c |    1 +
 drivers/video/display/jbt6k74.c    |   24 ++++--------------------
 2 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index accdbc5..d5841d7 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -553,6 +553,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
 		},
 		[PCF50633_REGULATOR_LDO6] = {
 			.name		= "user1",
+			.flags = PMU_VRAIL_F_SUSPEND_ON,
 			.voltage	= {
 				.init	= 0,
 				.max	= 3300,
diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c
index 7cc00ad..6fa1fe7 100644
--- a/drivers/video/display/jbt6k74.c
+++ b/drivers/video/display/jbt6k74.c
@@ -628,7 +628,7 @@ static int jbt_suspend(struct spi_device *spi, pm_message_t state)
 	struct jbt_info *jbt = dev_get_drvdata(&spi->dev);
 	struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data;
 
-	/* platform needs to register resume dependencies here */
+	/* platform can register resume dependencies here, if any */
 	if (jbt6k74_pdata->suspending)
 		(jbt6k74_pdata->suspending)(0, spi);
 
@@ -638,7 +638,7 @@ static int jbt_suspend(struct spi_device *spi, pm_message_t state)
 
 	jbt->have_resumed = 0;
 
-	(jbt6k74_pdata->reset)(0, 0);
+/*	(jbt6k74_pdata->reset)(0, 0); */
 
 	return 0;
 }
@@ -648,31 +648,17 @@ int jbt6k74_resume(struct spi_device *spi)
 	struct jbt_info *jbt = dev_get_drvdata(&spi->dev);
 	struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data;
 
-	/* if we still wait on dependencies, exit because we will get called
-	 * again.  This guy will get called once by core resume action, and
-	 * should be set as resume_dependency callback for any dependencies
-	 * set by platform code.
-	 */
-
 	if (jbt6k74_pdata->all_dependencies_resumed)
 		if (!(jbt6k74_pdata->all_dependencies_resumed)(0))
 			return 0;
 
 	/* we can get called twice with all dependencies resumed if our core
-	 * resume callback is last of all.  Protect against going twice
+	 * resume callback is last of all.  Protect against doing anything twice
 	 */
 	if (jbt->have_resumed)
 		return 0;
 
-	jbt->have_resumed = 1;
-
-	/* OK we are sure all devices we depend on for operation are up now */
-
-	/* even this needs glamo up on GTA02 :-/ */
-	(jbt6k74_pdata->reset)(0, 1);
-
-	jbt6k74_enter_state(jbt, JBT_STATE_DEEP_STANDBY);
-	msleep(100);
+	jbt->have_resumed |= 1;
 
 	switch (jbt->last_state) {
 	case JBT_STATE_QVGA_NORMAL:
@@ -684,8 +670,6 @@ int jbt6k74_resume(struct spi_device *spi)
 	}
 	jbt6k74_display_onoff(jbt, 1);
 
-	/* this gives the platform a chance to bring up backlight now */
-
 	if (jbt6k74_pdata->resuming)
 		(jbt6k74_pdata->resuming)(0);
 
-- 
1.5.6.5