summaryrefslogtreecommitdiff
path: root/patches.tizen/0180-video-display-panel-s6e8aa0-Add-support-for-suspend-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches.tizen/0180-video-display-panel-s6e8aa0-Add-support-for-suspend-.patch')
-rw-r--r--patches.tizen/0180-video-display-panel-s6e8aa0-Add-support-for-suspend-.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/patches.tizen/0180-video-display-panel-s6e8aa0-Add-support-for-suspend-.patch b/patches.tizen/0180-video-display-panel-s6e8aa0-Add-support-for-suspend-.patch
new file mode 100644
index 00000000000..26e132d2e55
--- /dev/null
+++ b/patches.tizen/0180-video-display-panel-s6e8aa0-Add-support-for-suspend-.patch
@@ -0,0 +1,62 @@
+From 8f989957167829755174e5759a53a1dc76041764 Mon Sep 17 00:00:00 2001
+From: Tomasz Figa <t.figa@samsung.com>
+Date: Tue, 26 Mar 2013 14:52:33 +0100
+Subject: [PATCH 0180/1302] video: display: panel-s6e8aa0: Add support for
+ suspend/resume
+
+This patch adds suspend and resume callbacks to the driver to turn off
+the display on suspend and turn it back on on resume if it was enabled
+before.
+
+Signed-off-by: Tomasz Figa <t.figa@samsung.com>
+Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
+---
+ drivers/video/display/panel-s6e8aa0.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+diff --git a/drivers/video/display/panel-s6e8aa0.c b/drivers/video/display/panel-s6e8aa0.c
+index 59c1ec9..3f69187 100644
+--- a/drivers/video/display/panel-s6e8aa0.c
++++ b/drivers/video/display/panel-s6e8aa0.c
+@@ -1227,6 +1227,30 @@ static int s6e8aa0_remove(struct platform_device *pdev)
+ return 0;
+ }
+
++static int s6e8aa0_suspend(struct device *dev)
++{
++ struct s6e8aa0 *lcd = dev_get_drvdata(dev);
++
++ if (lcd->power != FB_BLANK_UNBLANK)
++ return 0;
++
++ return display_entity_set_state(&lcd->entity, DISPLAY_ENTITY_STATE_OFF);
++}
++
++static int s6e8aa0_resume(struct device *dev)
++{
++ struct s6e8aa0 *lcd = dev_get_drvdata(dev);
++
++ if (lcd->power != FB_BLANK_UNBLANK)
++ return 0;
++
++ return display_entity_set_state(&lcd->entity, DISPLAY_ENTITY_STATE_ON);
++}
++
++static struct dev_pm_ops s6e8aa0_pm_ops = {
++ SET_SYSTEM_SLEEP_PM_OPS(s6e8aa0_suspend, s6e8aa0_resume)
++};
++
+ static struct platform_driver s6e8aa0_driver = {
+ .probe = s6e8aa0_probe,
+ .remove = s6e8aa0_remove,
+@@ -1234,6 +1258,7 @@ static struct platform_driver s6e8aa0_driver = {
+ .name = "panel_s6e8aa0",
+ .owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(s6e8aa0_of_match),
++ .pm = &s6e8aa0_pm_ops,
+ },
+ };
+ module_platform_driver(s6e8aa0_driver);
+--
+1.8.3.2
+