summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/hdmi.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2013-08-27 13:22:16 +0900
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:43:44 -0700
commit8af8271fc02dc2a9ab01f2cd8682c9f28b983af0 (patch)
treeb46697afaa682fb92e75c6dc4579351f7b9fef60 /drivers/video/tegra/dc/hdmi.c
parentb542cee14620876831f19f7e43690cbd40498514 (diff)
tegra: dc: hdmi: allow LP0 wakeup by hotplug GPIO
Introduce a new TEGRA_DC_OUT_HOTPLUG_WAKE_LP0 flag which can be specified for DC controllers for which we want the HDMI hotplug GPIO to serve as a LP0 wake source. Bug 1345127 Change-Id: I9193be6ada4b0eca1c074c4b9a5888e3b0e49150 Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-on: http://git-master/r/266365 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Aaron Gamble <jgamble@nvidia.com> Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/hdmi.c')
-rw-r--r--drivers/video/tegra/dc/hdmi.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index bf145b9e3c29..5b9e611d1054 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -959,6 +959,19 @@ static void tegra_dc_hdmi_suspend(struct tegra_dc *dc)
struct tegra_dc_hdmi_data *hdmi = tegra_dc_get_outdata(dc);
tegra_nvhdcp_suspend(hdmi->nvhdcp);
+
+ if (dc->out->flags & TEGRA_DC_OUT_HOTPLUG_WAKE_LP0) {
+ int wake_irq = gpio_to_irq(dc->out->hotplug_gpio);
+ int ret;
+
+ ret = enable_irq_wake(wake_irq);
+ if (ret < 0) {
+ dev_err(&dc->ndev->dev,
+ "%s: Couldn't enable HDMI wakeup, irq=%d, error=%d\n",
+ __func__, wake_irq, ret);
+ }
+ }
+
rt_mutex_lock(&hdmi->suspend_lock);
hdmi->suspended = true;
rt_mutex_unlock(&hdmi->suspend_lock);
@@ -978,6 +991,9 @@ static void tegra_dc_hdmi_resume(struct tegra_dc *dc)
rt_mutex_unlock(&hdmi->suspend_lock);
+ if (dc->out->flags & TEGRA_DC_OUT_HOTPLUG_WAKE_LP0)
+ disable_irq_wake(gpio_to_irq(dc->out->hotplug_gpio));
+
tegra_nvhdcp_resume(hdmi->nvhdcp);
}