summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/include/mach/dc.h2
-rw-r--r--drivers/video/tegra/dc/hdmi.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/dc.h b/arch/arm/mach-tegra/include/mach/dc.h
index ed4a3f74ffc2..b5abc2400558 100644
--- a/arch/arm/mach-tegra/include/mach/dc.h
+++ b/arch/arm/mach-tegra/include/mach/dc.h
@@ -515,6 +515,8 @@ struct tegra_dc_out {
#define TEGRA_DC_OUT_N_SHOT_MODE (1 << 4)
#define TEGRA_DC_OUT_ONE_SHOT_LP_MODE (1 << 5)
#define TEGRA_DC_OUT_INITIALIZED_MODE (1 << 6)
+/* Makes hotplug GPIO a LP0 wakeup source */
+#define TEGRA_DC_OUT_HOTPLUG_WAKE_LP0 (1 << 7)
#define TEGRA_DC_ALIGN_MSB 0
#define TEGRA_DC_ALIGN_LSB 1
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index 5ad5d1fcbdf9..d7629e8b4d15 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -979,6 +979,18 @@ static void tegra_dc_hdmi_suspend(struct tegra_dc *dc)
struct tegra_dc_hdmi_data *hdmi = tegra_dc_get_outdata(dc);
unsigned long flags;
+ 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);
+ }
+ }
+
/* turn off hotplug detection to avoid resume event when +5V falls */
tegra_hdmi_hotplug_disable(hdmi);
@@ -998,6 +1010,9 @@ static void tegra_dc_hdmi_resume(struct tegra_dc *dc)
spin_unlock_irqrestore(&hdmi->suspend_lock, flags);
+ 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);
/* restore hotplug detection */
tegra_hdmi_hotplug_enable(hdmi);