summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/suspend.c
diff options
context:
space:
mode:
authorGreg Meiste <w30289@motorola.com>2010-09-08 13:38:36 -0500
committerColin Cross <ccross@android.com>2010-10-27 18:15:49 -0700
commit2b32d2a33a1b15f8bff096deff51e222c9fa171b (patch)
treed9f851b1c99dc6ceb7b3d762afaedcd87afa4fcc /arch/arm/mach-tegra/suspend.c
parent281032d6495d99540a6cacfb414b98d7ac8e482f (diff)
[ARM] tegra: Setup regulators for suspend
The regulator framework may need to change certain regulators when entering suspend. Change-Id: I584e92b3c32cbd1a63325831822e2704a3dd2774 Signed-off-by: Greg Meiste <w30289@motorola.com>
Diffstat (limited to 'arch/arm/mach-tegra/suspend.c')
-rw-r--r--arch/arm/mach-tegra/suspend.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c
index aef50319852c..34b0e7e8fe7b 100644
--- a/arch/arm/mach-tegra/suspend.c
+++ b/arch/arm/mach-tegra/suspend.c
@@ -37,6 +37,8 @@
#include <linux/seq_file.h>
#include <linux/uaccess.h>
+#include <linux/regulator/machine.h>
+
#include <asm/cacheflush.h>
#include <asm/hardware/cache-l2x0.h>
#include <asm/hardware/gic.h>
@@ -476,6 +478,11 @@ static void tegra_suspend_dram(bool do_lp0)
wmb();
}
+static int tegra_suspend_begin(suspend_state_t state)
+{
+ return regulator_suspend_prepare(state);
+}
+
static int tegra_suspend_prepare_late(void)
{
disable_irq(INT_SYS_STATS_MON);
@@ -645,6 +652,7 @@ static int tegra_suspend_enter(suspend_state_t state)
static struct platform_suspend_ops tegra_suspend_ops = {
.valid = suspend_valid_only_mem,
+ .begin = tegra_suspend_begin,
.prepare_late = tegra_suspend_prepare_late,
.wake = tegra_suspend_wake,
.enter = tegra_suspend_enter,