summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/pm-debug.c
diff options
context:
space:
mode:
authormattis fjallstrom <mattis@acm.org>2015-05-21 12:00:33 -0700
committermattis fjallstrom <mattis@acm.org>2015-05-21 13:24:30 -0700
commit7d990a059acf5eb46ae99c058fc9911cbdce131d (patch)
treeac9531b3ff2b2670dabc84c248a1770c84109586 /arch/arm/mach-omap2/pm-debug.c
parente8980e2a6a7392ae5a1f882d1ba01e03ac83f899 (diff)
parent89fdc2c4bb83fff36199cd883a27efb317f02037 (diff)
downloadolio-linux-3.10-7d990a059acf5eb46ae99c058fc9911cbdce131d.tar.xz
olio-linux-3.10-7d990a059acf5eb46ae99c058fc9911cbdce131d.zip
Merge branch 'android-omap-minnow-3.10-lollipop-wear-release' of https://android.googlesource.com/kernel/omap into mattis_devmattis_dev
Change-Id: I46165dd7747b9b6289eb44cb96cbef2de46c10ba
Diffstat (limited to 'arch/arm/mach-omap2/pm-debug.c')
-rw-r--r--arch/arm/mach-omap2/pm-debug.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index b5dff42606c..ea5a306d1f1 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -38,8 +38,16 @@
#include "pm.h"
#include "pm-debug-regs.h"
+/* enable_off_mode is the runtime flag for enable/disable of offmode */
u32 enable_off_mode;
+/*
+ * global_disable_off_mode supercedes enable_off_mode and keeps
+ * offmode disabled as long as it is set
+ */
+bool global_disable_off_mode = 1;
+module_param(global_disable_off_mode, bool, 0644);
+
#ifdef CONFIG_DEBUG_FS
#include <linux/debugfs.h>
#include <linux/seq_file.h>
@@ -236,9 +244,13 @@ static int option_set(void *data, u64 val)
{
u32 *option = data;
- *option = val;
-
if (option == &enable_off_mode) {
+ if (global_disable_off_mode) {
+ pr_warn("Disable global_disable_off_mode "
+ "before enabling off mode");
+ return -EINVAL;
+ }
+
if (val)
omap_pm_enable_off_mode();
else
@@ -247,6 +259,8 @@ static int option_set(void *data, u64 val)
omap3_pm_off_mode_enable(val);
}
+ *option = val;
+
return 0;
}