summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/omapfb/omapfb-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-main.c')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 13733c8bb1b..98c645429bd 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2640,8 +2640,8 @@ static int omapfb_probe(struct platform_device *pdev)
r = omapfb_init_display(fbdev, def_display);
if (r) {
dev_err(fbdev->dev,
- "failed to initialize default "
- "display\n");
+ "failed to initialize default "
+ "display\n");
goto cleanup;
}
}
@@ -2687,9 +2687,36 @@ static int __exit omapfb_remove(struct platform_device *pdev)
return 0;
}
+/* Need to add suspend / wake pair of functions here.
+ * All we really need is for the suspend function to clear the screen
+ * to black.
+ */
+
+static int omapfb_suspend (struct platform_device * pdev, pm_message_t state)
+{
+ struct omapfb2_device *fbdev = platform_get_drvdata(pdev);
+ struct fb_info * fbi;
+
+ fbi = fbdev->fbs[0];
+
+ if (fbi != NULL)
+ omapfb_clear_fb(fbi);
+
+ return 0;
+}
+
+static int omapfb_resume (struct platform_device * pdev)
+{
+ /* No need to do anything, I think */
+
+ return 0;
+}
+
static struct platform_driver omapfb_driver = {
.probe = omapfb_probe,
.remove = __exit_p(omapfb_remove),
+ .suspend = omapfb_suspend,
+ .resume = omapfb_resume,
.driver = {
.name = "omapfb",
.owner = THIS_MODULE,