From 2bf6c9a4db92f98b97205d79cb6076a379675f98 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 19 Nov 2008 17:09:43 +0000 Subject: fix-suspend-backlight-timing-pm-debug.patch This patch improves the smoothness of suspend and resume action. Taking out CONFIG_PM_DEBUG allows much more rapid resume (the low level serial traffic appears to be synchronous) Added a platform callback in jbt driver and support in pcf50633 so we can defer bringing up the backlight until the LCM is able to process video again (which must happen after the glamo is up and producing video beacuse the LCM is hooked to glamo SPI) GTA01 should not be affected by all this as the callback will default to null and it is on pcf50606 Signed-off-by: Andy Green --- drivers/video/display/jbt6k74.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/display/jbt6k74.c b/drivers/video/display/jbt6k74.c index 7e11da7b47d..178e2daba63 100644 --- a/drivers/video/display/jbt6k74.c +++ b/drivers/video/display/jbt6k74.c @@ -647,9 +647,14 @@ static int jbt_suspend(struct spi_device *spi, pm_message_t state) static void jbt_resume_work(struct work_struct *work) { struct jbt_info *jbt = container_of(work, struct jbt_info, work); + struct jbt6k74_platform_data *jbt6k74_pdata = + jbt->spi_dev->dev.platform_data; printk(KERN_INFO"jbt_resume_work waiting...\n"); - msleep(2000); + /* 100ms is not enough here 2008-05-08 andy@openmoko.com + * if CONFIG_PM_DEBUG is enabled 2000ms is required + */ + msleep(400); printk(KERN_INFO"jbt_resume_work GO...\n"); jbt6k74_enter_state(jbt, JBT_STATE_DEEP_STANDBY); @@ -665,6 +670,11 @@ static void jbt_resume_work(struct work_struct *work) } jbt6k74_display_onoff(jbt, 1); + /* this gives the platform a chance to bring up backlight now */ + + if (jbt6k74_pdata->resuming) + (jbt6k74_pdata->resuming)(0); + printk(KERN_INFO"jbt_resume_work done...\n"); } -- cgit v1.2.3