summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Poynter <tpoynter@nvidia.com>2013-10-04 12:31:43 -0500
committerRiham Haidar <rhaidar@nvidia.com>2013-10-07 16:43:36 -0700
commit08e8dc0ee99d04b8bb9266396961e68291f5e2b2 (patch)
tree1f7790263723b88d9d9e3b6c480968e95d3d9aa3
parentf47786dec3026a7e88e156519290a964d32c8b05 (diff)
mach-tegra: Enable LP0 wakeup on HDMI hotplug for board-roth.
Set TEGRA_DC_OUT_HOTPLUG_WAKE_LP0 for roth_disp2_out which will arm the GPIO wakesource when set. Enable index WAKE4 / TEGRA_GPIO_PN7 (HDMI) as a wake source for board-roth. Bug 1367505. Change-Id: I4b4e3ca458243b3b27b316ac237264a0d323ff17 Signed-off-by: Todd Poynter <tpoynter@nvidia.com> Reviewed-on: http://git-master/r/281824 Reviewed-by: Dan Nolan <dnolan@nvidia.com> GVS: Gerrit_Virtual_Submit
-rw-r--r--arch/arm/mach-tegra/board-roth-panel.c23
-rw-r--r--arch/arm/mach-tegra/board-roth.c3
-rw-r--r--arch/arm/mach-tegra/board-roth.h3
3 files changed, 18 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/board-roth-panel.c b/arch/arm/mach-tegra/board-roth-panel.c
index f29181ac1e93..8329303d1ba6 100644
--- a/arch/arm/mach-tegra/board-roth-panel.c
+++ b/arch/arm/mach-tegra/board-roth-panel.c
@@ -35,6 +35,7 @@
#include "board.h"
#include "tegra-board-id.h"
+#include "board-roth.h"
#include "devices.h"
#include "gpio-names.h"
#include "tegra11_host1x_devices.h"
@@ -66,9 +67,6 @@ struct platform_device * __init roth_host1x_init(void)
#define DC_CTRL_MODE TEGRA_DC_OUT_CONTINUOUS_MODE
-/* HDMI Hotplug detection pin */
-#define roth_hdmi_hpd TEGRA_GPIO_PN7
-
static atomic_t sd_brightness = ATOMIC_INIT(255);
static bool reg_requested;
@@ -524,6 +522,7 @@ fail:
}
static struct tegra_dc_out roth_disp1_out;
+static struct tegra_dc_out roth_disp2_out;
static int roth_dsi_panel_enable(struct device *dev)
{
@@ -702,10 +701,12 @@ static int roth_hdmi_disable(void)
static int roth_hdmi_postsuspend(void)
{
- if (roth_hdmi_vddio) {
- regulator_disable(roth_hdmi_vddio);
- regulator_put(roth_hdmi_vddio);
- roth_hdmi_vddio = NULL;
+ if (!(roth_disp2_out.flags & TEGRA_DC_OUT_HOTPLUG_WAKE_LP0)) {
+ if (roth_hdmi_vddio) {
+ regulator_disable(roth_hdmi_vddio);
+ regulator_put(roth_hdmi_vddio);
+ roth_hdmi_vddio = NULL;
+ }
}
return 0;
}
@@ -761,11 +762,11 @@ struct tegra_hdmi_out roth_hdmi_out = {
static struct tegra_dc_out roth_disp2_out = {
.type = TEGRA_DC_OUT_HDMI,
- .flags = TEGRA_DC_OUT_HOTPLUG_HIGH,
+ .flags = TEGRA_DC_OUT_HOTPLUG_HIGH | TEGRA_DC_OUT_HOTPLUG_WAKE_LP0,
.parent_clk = "pll_d2_out0",
.dcc_bus = 3,
- .hotplug_gpio = roth_hdmi_hpd,
+ .hotplug_gpio = TEGRA_GPIO_HDMI_HPD,
.max_pixclock = KHZ2PICOS(297000),
@@ -990,8 +991,8 @@ int __init roth_panel_init(int board_id)
return -EINVAL;
}
- gpio_request(roth_hdmi_hpd, "hdmi_hpd");
- gpio_direction_input(roth_hdmi_hpd);
+ gpio_request(TEGRA_GPIO_HDMI_HPD, "hdmi_hpd");
+ gpio_direction_input(TEGRA_GPIO_HDMI_HPD);
res = platform_get_resource_byname(&roth_disp1_device,
IORESOURCE_MEM, "fbmem");
res->start = tegra_fb_start;
diff --git a/arch/arm/mach-tegra/board-roth.c b/arch/arm/mach-tegra/board-roth.c
index a7af001d4e35..ef01a6ef4dab 100644
--- a/arch/arm/mach-tegra/board-roth.c
+++ b/arch/arm/mach-tegra/board-roth.c
@@ -76,6 +76,7 @@
#include "gpio-names.h"
#include "fuse.h"
#include "pm.h"
+#include "pm-irq.h"
#include "common.h"
#include "tegra-board-id.h"
#include "board-touch-raydium.h"
@@ -831,6 +832,8 @@ static void __init tegra_roth_init(void)
roth_fan_init();
roth_revision_init();
roth_issp_init();
+ /* Enable HDMI hotplug as a wakesource */
+ tegra_set_wake_gpio(4, TEGRA_GPIO_HDMI_HPD);
}
static void __init roth_ramconsole_reserve(unsigned long size)
diff --git a/arch/arm/mach-tegra/board-roth.h b/arch/arm/mach-tegra/board-roth.h
index 9351c102bced..e6d6be9b2ccc 100644
--- a/arch/arm/mach-tegra/board-roth.h
+++ b/arch/arm/mach-tegra/board-roth.h
@@ -37,6 +37,9 @@
/* Hall Effect Sensor GPIO */
#define TEGRA_GPIO_HALL TEGRA_GPIO_PS0
+/* Display-related GPIOs */
+#define TEGRA_GPIO_HDMI_HPD TEGRA_GPIO_PN7
+
/* Audio-related GPIOs */
#define TEGRA_GPIO_CDC_IRQ TEGRA_GPIO_PW3
#define TEGRA_GPIO_LDO1_EN TEGRA_GPIO_PV3