Andy Green wrote:
Somebody in the thread at some point said:
| It seems power management is much worse this week than last.
|
| 1) Audio is not returned to the proper state on resume.
| 2) GSM radio serial link not returned to proper state.
| 3) Screen flashes occasionally as though it is being awakened at times
| then goes back to black.
| 4) audio pops.
| 5) Sometimes doesn't wake up at all and I have to pull USB and battery
| to recover. No other way works.
|
| These issues were not present about a wee ago. I have made sure I do not
| have merge issues with the andy tree.
Not really seeing these, although I don't particularly test the GSM
side. If what you propose is exactly as you say it, you are really
saying that these four patches
4 days ago
Andy Green
fix-reduce-wake-reasons-in-pcf50633.patch
4 days ago
Andy Green
add-resume-reason-sysfs.patch
7 days ago
Andy Green
fix-motion-sensor-corruption.patch
7 days ago
Holger Freyther
Fixup hang on resume caused by the s3c2410 touch screen ...
made all that trouble? It seems more likely some of these are longer
term issues other people see, eg, pulseaudio bug is floating around for
audio issue, hang in pcf50633 when suspended for a while, etc.
What config are you using?
-Andy
Well one of the problems is that the LED is being seriously over-tweaked
on resume. There should be no need to turn it on, then off, then on yet
again if you are a gta02. Plus there is a timing issue where the
gta02_jbt6k74_resuming is expected to be called after pcf50633_resume.
This does not appear to be the case if you awake from something like a ring.
The attached changes make my screen reliably turn back on.
Sean
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
index afb2990..8b3b056 100644
--- a/drivers/i2c/chips/pcf50633.c
+++ b/drivers/i2c/chips/pcf50633.c
@@ -2037,8 +2037,8 @@ static int pcf50633_suspend(struct device *dev, pm_message_t state)
void pcf50633_backlight_resume(struct pcf50633_data *pcf)
{
/* we force the backlight on in fact */
- __reg_write(pcf, PCF50633_REG_LEDOUT, 0x3f);
- __reg_write(pcf, PCF50633_REG_LEDENA, 0x21);
+ __reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.ledout);
+ __reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.ledena);
__reg_write(pcf, PCF50633_REG_LEDDIM, pcf->standby_regs.leddim);
}
EXPORT_SYMBOL_GPL(pcf50633_backlight_resume);
@@ -2052,8 +2052,6 @@ static int pcf50633_resume(struct device *dev)
/* mutex_lock(&pcf->lock); */ /* resume in atomic context */
- __reg_write(pcf, PCF50633_REG_LEDENA, 0x01);
-
/* Resume all saved registers that don't "survive" standby state */
__reg_write(pcf, PCF50633_REG_INT1M, pcf->standby_regs.int1m);
__reg_write(pcf, PCF50633_REG_INT2M, pcf->standby_regs.int2m);
@@ -2076,10 +2074,6 @@ static int pcf50633_resume(struct device *dev)
__reg_write(pcf, PCF50633_REG_LEDOUT, pcf->standby_regs.ledout);
__reg_write(pcf, PCF50633_REG_LEDENA, pcf->standby_regs.ledena);
__reg_write(pcf, PCF50633_REG_LEDDIM, pcf->standby_regs.leddim);
- } else { /* force backlight down, platform will restore later */
- __reg_write(pcf, PCF50633_REG_LEDOUT, 2);
- __reg_write(pcf, PCF50633_REG_LEDENA, 0x20);
- __reg_write(pcf, PCF50633_REG_LEDDIM, 1);
}
/* FIXME: one big read? */