diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2009-12-15 19:46:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:01 -0500 |
commit | 6841bcfa6de5712a04531480fd1970ba462461f9 (patch) | |
tree | e011910298c948519df492ad4f8003b1d5de9b42 /drivers/video/bfin-t350mcqb-fb.c | |
parent | 9cfe4a93e50bb36392c8d74432e4607f297cdbfc (diff) |
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: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/bfin-t350mcqb-fb.c')
-rw-r--r-- | drivers/video/bfin-t350mcqb-fb.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index 5cc36cfbf07b..46cb07f61b0f 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -634,17 +634,35 @@ static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev) | |||
634 | #ifdef CONFIG_PM | 634 | #ifdef CONFIG_PM |
635 | static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state) | 635 | static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state) |
636 | { | 636 | { |
637 | bfin_t350mcqb_disable_ppi(); | 637 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
638 | disable_dma(CH_PPI); | 638 | struct bfin_t350mcqbfb_info *fbi = fbinfo->par; |
639 | bfin_write_PPI_STATUS(0xFFFF); | 639 | |
640 | if (fbi->lq043_open_cnt) { | ||
641 | bfin_t350mcqb_disable_ppi(); | ||
642 | disable_dma(CH_PPI); | ||
643 | bfin_t350mcqb_stop_timers(); | ||
644 | bfin_write_PPI_STATUS(-1); | ||
645 | } | ||
646 | |||
640 | 647 | ||
641 | return 0; | 648 | return 0; |
642 | } | 649 | } |
643 | 650 | ||
644 | static int bfin_t350mcqb_resume(struct platform_device *pdev) | 651 | static int bfin_t350mcqb_resume(struct platform_device *pdev) |
645 | { | 652 | { |
646 | enable_dma(CH_PPI); | 653 | struct fb_info *fbinfo = platform_get_drvdata(pdev); |
647 | bfin_t350mcqb_enable_ppi(); | 654 | struct bfin_t350mcqbfb_info *fbi = fbinfo->par; |
655 | |||
656 | if (fbi->lq043_open_cnt) { | ||
657 | bfin_t350mcqb_config_dma(fbi); | ||
658 | bfin_t350mcqb_config_ppi(fbi); | ||
659 | bfin_t350mcqb_init_timers(); | ||
660 | |||
661 | /* start dma */ | ||
662 | enable_dma(CH_PPI); | ||
663 | bfin_t350mcqb_enable_ppi(); | ||
664 | bfin_t350mcqb_start_timers(); | ||
665 | } | ||
648 | 666 | ||
649 | return 0; | 667 | return 0; |
650 | } | 668 | } |