summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/suspend.c
diff options
context:
space:
mode:
authorPrashant Gaikwad <pgaikwad@nvidia.com>2011-04-21 09:43:48 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-04-25 18:46:45 -0700
commitb6426b90fd99bf82114465a12ff7e4da2a4c982e (patch)
tree6378df0ead6cab8f57d2b8493f32068e86d65419 /arch/arm/mach-tegra/suspend.c
parent57e983200f1879da88519b0bec3fb3cbaaa99caa (diff)
ARM: tegra: whistler: Power down/up core railtegra-11.2.5
program pwren signal of max8907c regulator to power down/up core rail on deep sleep enter/exit deep sleep mode. core_timer and core_off_timer changed as per K32. separate_req set to false as whistler pmu has combined power requests. Bug 817378 Change-Id: Ia95a61360079f919a039572cf8fd4597db9efd50 Reviewed-on: http://git-master/r/28435 Tested-by: Prashant Gaikwad <pgaikwad@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/suspend.c')
-rw-r--r--arch/arm/mach-tegra/suspend.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c
index 7e581b198216..77c3c1c0fec0 100644
--- a/arch/arm/mach-tegra/suspend.c
+++ b/arch/arm/mach-tegra/suspend.c
@@ -701,8 +701,29 @@ static int tegra_suspend_enter(suspend_state_t state)
return 0;
}
+/*
+ * Function pointers to optional board specific function
+ */
+void (*tegra_deep_sleep)(int);
+EXPORT_SYMBOL(tegra_deep_sleep);
+
+static int tegra_suspend_prepare(void)
+{
+ if ((current_suspend_mode == TEGRA_SUSPEND_LP0) && tegra_deep_sleep)
+ tegra_deep_sleep(1);
+ return 0;
+}
+
+static void tegra_suspend_finish(void)
+{
+ if ((current_suspend_mode == TEGRA_SUSPEND_LP0) && tegra_deep_sleep)
+ tegra_deep_sleep(0);
+}
+
static struct platform_suspend_ops tegra_suspend_ops = {
.valid = suspend_valid_only_mem,
+ .prepare = tegra_suspend_prepare,
+ .finish = tegra_suspend_finish,
.begin = tegra_suspend_begin,
.prepare_late = tegra_suspend_prepare_late,
.wake = tegra_suspend_wake,