aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:48 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:48 +0000
commit09527e6587b77680bc774de42ed6ee2106b22a11 (patch)
tree2158d671f7c7f2707e9326b0cec211a022bd5cfd /arch
parentb732ba26602e131b9849ad171080e6871b4faa06 (diff)
fix-pcf50633-kill-white-splash-of-death-on-suspend.patch
mach-gta02 meddles with the regulator platform struct after it is defined, leading to LCM power getting lost in suspend despite I set it to be left up. Fixing this finally removes the incredibly stubborn white LCM on suspend "flash". This is also going to be implicated in Sean McNeil's experience of monochromatic LCM after resume, which was previously attacked by resetting and re-initing the LCM from scratch. In addition, I realized that we take down core_1v3 in pcf50633 suspend action, this is happening near the start of suspend, so we are in a meta-race to finish suspend in a controlled way before the caps on core_1v3 run out (I only saw 23.3uF total). If it's true, this is where the weirdo sensitivity to timing during suspend is coming from. Therefore in this patch we also remove sleeps and dev_info() etc (which have to flush on serial console) from the pc50633 isr workqueue if we are in pcf50633 driver suspend state 1, ie, suspending... because we don't have time for it. Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c43
1 files changed, 31 insertions, 12 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 654dc8fa092..0bacafafed2 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -485,6 +485,9 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
[1] = PCF50633_INT2_ONKEYF,
[2] = PCF50633_INT3_ONKEY1S
},
+ /* warning: these get rewritten during machine init below
+ * depending on pcb variant
+ */
.rails = {
[PCF50633_REGULATOR_AUTO] = {
.name = "io_3v3",
@@ -496,6 +499,12 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
},
[PCF50633_REGULATOR_DOWN1] = {
.name = "core_1v3",
+ /* Wow, when we are going into suspend, after pcf50633
+ * runs its suspend (which happens real early since it
+ * is an i2c device) we are running out of the 22uF cap
+ * on core_1v3 rail !!!!
+ */
+ .flags = PMU_VRAIL_F_SUSPEND_ON,
.voltage = {
.init = 1300,
.max = 1600,
@@ -503,6 +512,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
},
[PCF50633_REGULATOR_DOWN2] = {
.name = "core_1v8",
+ .flags = PMU_VRAIL_F_SUSPEND_ON,
.voltage = {
.init = 1800,
.max = 1800,
@@ -516,8 +526,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
},
},
[PCF50633_REGULATOR_LDO1] = {
- .name = "stby_1v3",
- .flags = PMU_VRAIL_F_SUSPEND_ON,
+ .name = "gsensor_3v3",
.voltage = {
.init = 1300,
.max = 1330,
@@ -531,7 +540,7 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
},
},
[PCF50633_REGULATOR_LDO3] = {
- .name = "lcm_3v",
+ .name = "unused3",
.voltage = {
.init = 3000,
.max = 3000,
@@ -545,20 +554,28 @@ static struct pcf50633_platform_data gta02_pcf_pdata = {
},
},
[PCF50633_REGULATOR_LDO5] = {
- .name = "gl_1v5",
+ .name = "rf3v",
.voltage = {
.init = 1500,
.max = 1500,
},
},
[PCF50633_REGULATOR_LDO6] = {
- .name = "user1",
+ .name = "lcm_3v",
.flags = PMU_VRAIL_F_SUSPEND_ON,
.voltage = {
.init = 0,
.max = 3300,
},
},
+ [PCF50633_REGULATOR_MEMLDO] = {
+ .name = "memldo",
+ .flags = PMU_VRAIL_F_SUSPEND_ON,
+ .voltage = {
+ .init = 1800,
+ .max = 1800,
+ },
+ },
},
.defer_resume_backlight = 1,
};
@@ -611,13 +628,15 @@ static void mangle_pmu_pdata_by_system_rev(void)
.max = 3000,
}
});
- gta02_pcf_pdata.rails[PCF50633_REGULATOR_LDO6] = ((struct pmu_voltage_rail) {
- .name = "lcm_3v",
- .voltage = {
- .init = 3000,
- .max = 3000,
- }
- });
+ gta02_pcf_pdata.rails[PCF50633_REGULATOR_LDO6] =
+ ((struct pmu_voltage_rail) {
+ .name = "lcm_3v",
+ .flags = PMU_VRAIL_F_SUSPEND_ON,
+ .voltage = {
+ .init = 3000,
+ .max = 3000,
+ }
+ });
break;
default:
break;