summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-cardhu-power.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-07-15 11:10:57 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-07-15 16:50:44 -0700
commit0285ea73b85f3f1f662c307c13f208c5eab64178 (patch)
treea7265156d41d1deacf27350584bfd490f765eef7 /arch/arm/mach-tegra/board-cardhu-power.c
parentcddc2f824cbce533c1d8229e1cc29a212370f2cc (diff)
arm: tegra: cardhu: Add board level suspend/resume
Adding board level suspend/resume for cardhu. Disabling the clock for console uart port if console_suspend is enabled. bug 820536 Change-Id: Iecb78708ff7784dd131ffa83692b2419dba44e88 Reviewed-on: http://git-master/r/41147 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-power.c')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-power.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-power.c b/arch/arm/mach-tegra/board-cardhu-power.c
index 11a33200dca3..ccf428c9fa66 100644
--- a/arch/arm/mach-tegra/board-cardhu-power.c
+++ b/arch/arm/mach-tegra/board-cardhu-power.c
@@ -900,6 +900,18 @@ int __init cardhu_gpio_switch_regulator_init(void)
return platform_device_register(&gswitch_regulator_pdata);
}
+static void cardhu_board_suspend(int lp_state, enum suspend_stage stg)
+{
+ if ((lp_state == 1) && (stg == TEGRA_SUSPEND_BEFORE_CPU))
+ debug_uart_suspend();
+}
+
+static void cardhu_board_resume(int lp_state, enum resume_stage stg)
+{
+ if ((lp_state == 1) && (stg == TEGRA_RESUME_AFTER_CPU))
+ debug_uart_resume();
+}
+
static struct tegra_suspend_platform_data cardhu_suspend_data = {
.cpu_timer = 2000,
.cpu_off_timer = 200,
@@ -915,6 +927,8 @@ static struct tegra_suspend_platform_data cardhu_suspend_data = {
.wake_low = TEGRA_WAKE_GPIO_PV0 | TEGRA_WAKE_PWR_INT,
.wake_any = TEGRA_WAKE_KBC_EVENT,
.cpu_lp2_min_residency = 2000,
+ .board_suspend = cardhu_board_suspend,
+ .board_resume = cardhu_board_resume,
};
int __init cardhu_suspend_init(void)