changed Makefile and profiles, added patches for kernel 2.6.24
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 0168-change-lcm-keep-power-faster-resume.patch.patch
1 From b022e94ed594ce88e0aeec92d0cd56cc9aa2758d Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:13 +0100
4 Subject: [PATCH] change-lcm-keep-power-faster-resume.patch
5
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.
8
9 Signed-off-by: Andy Green <andy@openmoko.com>
10 ---
11  arch/arm/mach-s3c2440/mach-gta02.c |    1 +
12  drivers/video/display/jbt6k74.c    |   24 ++++--------------------
13  2 files changed, 5 insertions(+), 20 deletions(-)
14
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 = {
20                 },
21                 [PCF50633_REGULATOR_LDO6] = {
22                         .name           = "user1",
23 +                       .flags = PMU_VRAIL_F_SUSPEND_ON,
24                         .voltage        = {
25                                 .init   = 0,
26                                 .max    = 3300,
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;
34  
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);
39  
40 @@ -638,7 +638,7 @@ static int jbt_suspend(struct spi_device *spi, pm_message_t state)
41  
42         jbt->have_resumed = 0;
43  
44 -       (jbt6k74_pdata->reset)(0, 0);
45 +/*     (jbt6k74_pdata->reset)(0, 0); */
46  
47         return 0;
48  }
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;
52  
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.
57 -        */
58 -
59         if (jbt6k74_pdata->all_dependencies_resumed)
60                 if (!(jbt6k74_pdata->all_dependencies_resumed)(0))
61                         return 0;
62  
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
66          */
67         if (jbt->have_resumed)
68                 return 0;
69  
70 -       jbt->have_resumed = 1;
71 -
72 -       /* OK we are sure all devices we depend on for operation are up now */
73 -
74 -       /* even this needs glamo up on GTA02 :-/ */
75 -       (jbt6k74_pdata->reset)(0, 1);
76 -
77 -       jbt6k74_enter_state(jbt, JBT_STATE_DEEP_STANDBY);
78 -       msleep(100);
79 +       jbt->have_resumed |= 1;
80  
81         switch (jbt->last_state) {
82         case JBT_STATE_QVGA_NORMAL:
83 @@ -684,8 +670,6 @@ int jbt6k74_resume(struct spi_device *spi)
84         }
85         jbt6k74_display_onoff(jbt, 1);
86  
87 -       /* this gives the platform a chance to bring up backlight now */
88 -
89         if (jbt6k74_pdata->resuming)
90                 (jbt6k74_pdata->resuming)(0);
91  
92 -- 
93 1.5.6.3
94