summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshwini Ghuge <aghuge@nvidia.com>2012-02-29 16:55:01 +0530
committerSimone Willett <swillett@nvidia.com>2012-03-02 18:04:53 -0800
commit8780b7f83aa5482369509b6149dd33c5f56fbed2 (patch)
treeec9c486c9203c1717139d04f2f7f072cfcfb7287
parent2f1547fd357c90df9532740e6019a9141b9aeff3 (diff)
arm: tegra: power: disable SUSPEND_LP2 mode selection
Disable selection of LP2 suspend mode from sysfs and if LP2 mode set from board file change mode to LP0 Bug 928456 Change-Id: I1603153e23688ff1048289c4e04f7c7337f480af Reviewed-on: http://git-master/r/86580 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/pm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/pm.c b/arch/arm/mach-tegra/pm.c
index f74c159262cd..450c5e17c2d2 100644
--- a/arch/arm/mach-tegra/pm.c
+++ b/arch/arm/mach-tegra/pm.c
@@ -980,7 +980,8 @@ static ssize_t suspend_mode_store(struct kobject *kobj,
if (!len)
goto bad_name;
/* TEGRA_SUSPEND_NONE not allowed as suspend state */
- if (!(strncmp(buf, tegra_suspend_name[TEGRA_SUSPEND_NONE], len))) {
+ if (!(strncmp(buf, tegra_suspend_name[TEGRA_SUSPEND_NONE], len))
+ || !(strncmp(buf, tegra_suspend_name[TEGRA_SUSPEND_LP2], len))) {
pr_info("Illegal tegra suspend state: %s\n", buf);
goto bad_name;
}
@@ -1046,6 +1047,9 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
(void)reg;
(void)mode;
+ if (plat->suspend_mode == TEGRA_SUSPEND_LP2)
+ plat->suspend_mode = TEGRA_SUSPEND_LP0;
+
#ifndef CONFIG_PM_SLEEP
if (plat->suspend_mode != TEGRA_SUSPEND_NONE) {
pr_warning("%s: Suspend requires CONFIG_PM_SLEEP -- "