summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2011-12-27 16:08:30 +0800
committerSebastien Jan <s-jan@ti.com>2012-01-06 16:41:21 +0100
commit54cd585ecefa832104ba8b704db4d5a2f20dc1cf (patch)
tree1b0a91e351220348d992a499a43d80280e917314 /drivers
parentec2c9e69f7c278aa4b105526623a3d6f8e9b30cf (diff)
omap dss provide late suspend handler to solve failed early suspend runtime pm
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/dss/dispc.c13
-rw-r--r--drivers/video/omap2/dss/hdmi.c13
2 files changed, 26 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 9c93aeae62af..403e2f160cce 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -3461,9 +3461,22 @@ static int dispc_runtime_resume(struct device *dev)
return 0;
}
+/*
+ * when dispc_runtime_resume is called by pm code in early resume,
+ * dss_runtime_get () fails because it's still in suspend.
+ * this resume callback serves to redo the broken runtime resume
+ * action in late suspend.
+ */
+
+static int dispc_resume(struct device *dev)
+{
+ return dispc_runtime_resume(dev);
+}
+
static const struct dev_pm_ops dispc_pm_ops = {
.runtime_suspend = dispc_runtime_suspend,
.runtime_resume = dispc_runtime_resume,
+ .resume = dispc_resume,
};
static struct platform_driver omap_dispchw_driver = {
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 9cf9711f3b7d..db48857a4ce9 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -868,9 +868,22 @@ err_get_dss:
return r;
}
+/*
+ * when dispc_runtime_resume is called by pm code in early resume,
+ * dss_runtime_get () fails because it's still in suspend.
+ * This resume callback serves to redo the runtime pm get broken
+ * by it happening in early suspend
+ */
+
+static int hdmi_resume(struct device *dev)
+{
+ return hdmi_runtime_resume(dev);
+}
+
static const struct dev_pm_ops hdmi_pm_ops = {
.runtime_suspend = hdmi_runtime_suspend,
.runtime_resume = hdmi_runtime_resume,
+ .resume = hdmi_resume,
};
static struct platform_driver omapdss_hdmihw_driver = {