Commit 6841bcfa authored by Michael Hennerich's avatar Michael Hennerich Committed by Linus Torvalds

fbdev: bfin-t350mcqb-fb: handle all resources in suspend/resume

The LCD commands DMA/timers as well as PPI which we need to save/restore.
Signed-off-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9cfe4a93
...@@ -634,17 +634,35 @@ static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev) ...@@ -634,17 +634,35 @@ static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev)
#ifdef CONFIG_PM #ifdef CONFIG_PM
static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state) static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state)
{ {
struct fb_info *fbinfo = platform_get_drvdata(pdev);
struct bfin_t350mcqbfb_info *fbi = fbinfo->par;
if (fbi->lq043_open_cnt) {
bfin_t350mcqb_disable_ppi(); bfin_t350mcqb_disable_ppi();
disable_dma(CH_PPI); disable_dma(CH_PPI);
bfin_write_PPI_STATUS(0xFFFF); bfin_t350mcqb_stop_timers();
bfin_write_PPI_STATUS(-1);
}
return 0; return 0;
} }
static int bfin_t350mcqb_resume(struct platform_device *pdev) static int bfin_t350mcqb_resume(struct platform_device *pdev)
{ {
struct fb_info *fbinfo = platform_get_drvdata(pdev);
struct bfin_t350mcqbfb_info *fbi = fbinfo->par;
if (fbi->lq043_open_cnt) {
bfin_t350mcqb_config_dma(fbi);
bfin_t350mcqb_config_ppi(fbi);
bfin_t350mcqb_init_timers();
/* start dma */
enable_dma(CH_PPI); enable_dma(CH_PPI);
bfin_t350mcqb_enable_ppi(); bfin_t350mcqb_enable_ppi();
bfin_t350mcqb_start_timers();
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment