1 From 897135bb5ce881419ee6e7c97875293b3e74330c Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Wed, 2 Jul 2008 22:40:28 +0100
4 Subject: [PATCH] change-lcm-keep-power-faster-resume.patch
6 The LCM spins for 100ms during resume for not much reason. Leave it powered
7 (it is meant to pull uA when suspended) and get nice fast resume to video.
9 Signed-off-by: Andy Green <andy@openmoko.com>
11 arch/arm/mach-s3c2440/mach-gta02.c | 1 +
12 drivers/video/display/jbt6k74.c | 24 ++++--------------------
13 2 files changed, 5 insertions(+), 20 deletions(-)
15 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
16 index accdbc5..d5841d7 100644
17 --- a/arch/arm/mach-s3c2440/mach-gta02.c
18 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
19 @@ -553,6 +553,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
21 [PCF50633_REGULATOR_LDO6] = {
23 + .flags = PMU_VRAIL_F_SUSPEND_ON,
27 diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c
28 index 7cc00ad..6fa1fe7 100644
29 --- a/drivers/video/display/jbt6k74.c
30 +++ b/drivers/video/display/jbt6k74.c
31 @@ -628,7 +628,7 @@ static int jbt_suspend(struct spi_device *spi, pm_message_t state)
32 struct jbt_info *jbt = dev_get_drvdata(&spi->dev);
33 struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data;
35 - /* platform needs to register resume dependencies here */
36 + /* platform can register resume dependencies here, if any */
37 if (jbt6k74_pdata->suspending)
38 (jbt6k74_pdata->suspending)(0, spi);
40 @@ -638,7 +638,7 @@ static int jbt_suspend(struct spi_device *spi, pm_message_t state)
42 jbt->have_resumed = 0;
44 - (jbt6k74_pdata->reset)(0, 0);
45 +/* (jbt6k74_pdata->reset)(0, 0); */
49 @@ -648,31 +648,17 @@ int jbt6k74_resume(struct spi_device *spi)
50 struct jbt_info *jbt = dev_get_drvdata(&spi->dev);
51 struct jbt6k74_platform_data *jbt6k74_pdata = spi->dev.platform_data;
53 - /* if we still wait on dependencies, exit because we will get called
54 - * again. This guy will get called once by core resume action, and
55 - * should be set as resume_dependency callback for any dependencies
56 - * set by platform code.
59 if (jbt6k74_pdata->all_dependencies_resumed)
60 if (!(jbt6k74_pdata->all_dependencies_resumed)(0))
63 /* we can get called twice with all dependencies resumed if our core
64 - * resume callback is last of all. Protect against going twice
65 + * resume callback is last of all. Protect against doing anything twice
67 if (jbt->have_resumed)
70 - jbt->have_resumed = 1;
72 - /* OK we are sure all devices we depend on for operation are up now */
74 - /* even this needs glamo up on GTA02 :-/ */
75 - (jbt6k74_pdata->reset)(0, 1);
77 - jbt6k74_enter_state(jbt, JBT_STATE_DEEP_STANDBY);
79 + jbt->have_resumed |= 1;
81 switch (jbt->last_state) {
82 case JBT_STATE_QVGA_NORMAL:
83 @@ -684,8 +670,6 @@ int jbt6k74_resume(struct spi_device *spi)
85 jbt6k74_display_onoff(jbt, 1);
87 - /* this gives the platform a chance to bring up backlight now */
89 if (jbt6k74_pdata->resuming)
90 (jbt6k74_pdata->resuming)(0);