diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:11:17 +0000 |
---|---|---|
committer | Andy Green <andy@openmoko.com> | 2008-11-19 17:11:17 +0000 |
commit | 5776838f47b503677edd8f9fb55cb706d9122fed (patch) | |
tree | 156d28204cd4b6f53492d1ce288f4e7bf6d958b2 | |
parent | 754d92cefb28dc338af35babdff43e280c2a1d27 (diff) |
fix-glamo-resume-dont-restuff-regs-do-reinit-in-framebuffer-resume.patch
Signed-off-by: Andy Green <andy@openmoko.com>
-rw-r--r-- | drivers/mfd/glamo/glamo-core.c | 5 | ||||
-rw-r--r-- | drivers/mfd/glamo/glamo-fb.c | 15 |
2 files changed, 17 insertions, 3 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c index 9d44717c406..9a3a00ea917 100644 --- a/drivers/mfd/glamo/glamo-core.c +++ b/drivers/mfd/glamo/glamo-core.c @@ -980,11 +980,14 @@ static const REG_VALUE_MASK_TYPE reg_powerSuspend[] = glamo_run_script(glamo, glamo_init_script, ARRAY_SIZE(glamo_init_script), 0); - +/* for (n = 0; n < ARRAY_SIZE(reg_range); n++) for (ads = reg_range[n].start; ads < (reg_range[n].start + reg_range[n].count); ads += 2) __reg_write(glamo, ads, suspend_regs[ads >> 1]); +*/ + /* do not bypass LCD controller */ + __reg_write(glamo, 0x2f0, 0x1); spin_unlock_irqrestore(&glamo->lock, flags); diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c index 7bfd539972f..66462672f52 100644 --- a/drivers/mfd/glamo/glamo-fb.c +++ b/drivers/mfd/glamo/glamo-fb.c @@ -959,13 +959,24 @@ static int glamofb_suspend(struct platform_device *pdev, pm_message_t state) static int glamofb_resume(struct platform_device *pdev) { - struct glamofb_handle *gfb = platform_get_drvdata(pdev); + struct glamofb_handle *glamofb = platform_get_drvdata(pdev); + struct glamofb_platform_data *mach_info = pdev->dev.platform_data; /* OK let's allow framebuffer ops again */ // gfb->fb->screen_base = ioremap(gfb->fb_res->start, // RESSIZE(gfb->fb_res)); + glamo_engine_enable(mach_info->glamo, GLAMO_ENGINE_LCD); + glamo_engine_reset(mach_info->glamo, GLAMO_ENGINE_LCD); + + printk(KERN_ERR"spin_lock_init\n"); + spin_lock_init(&glamofb->lock_cmd); + glamofb_init_regs(glamofb); +#ifdef CONFIG_MFD_GLAMO_HWACCEL + glamofb_cursor_onoff(glamofb, 1); +#endif + - fb_set_suspend(gfb->fb, 0); + fb_set_suspend(glamofb->fb, 0); // fb_blank(gfb->fb, FB_BLANK_UNBLANK); return 0; |