summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-ux500/pm/Makefile2
-rw-r--r--arch/arm/mach-ux500/pm/no_suspend.c14
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/pm/Makefile b/arch/arm/mach-ux500/pm/Makefile
index 3d56e345159..79a0ea49ca8 100644
--- a/arch/arm/mach-ux500/pm/Makefile
+++ b/arch/arm/mach-ux500/pm/Makefile
@@ -1,7 +1,7 @@
#
# Power save related files
#
-obj-y := pm.o runtime.o
+obj-y := pm.o runtime.o no_suspend.o
obj-$(CONFIG_U8500_CPUIDLE) += cpuidle.o timer.o
obj-$(CONFIG_U8500_CPUIDLE_DEBUG) += cpuidle_dbg.o
diff --git a/arch/arm/mach-ux500/pm/no_suspend.c b/arch/arm/mach-ux500/pm/no_suspend.c
new file mode 100644
index 00000000000..9eb77514f3c
--- /dev/null
+++ b/arch/arm/mach-ux500/pm/no_suspend.c
@@ -0,0 +1,14 @@
+
+#include <linux/kernel.h>
+#include <linux/wakelock.h>
+
+/* Temporary suspend blocker until suspend works */
+
+static struct wake_lock wakelock;
+static int __init take_wake_lock(void)
+{
+ wake_lock_init(&wakelock, WAKE_LOCK_SUSPEND, "no_suspend");
+ wake_lock(&wakelock);
+ return 0;
+}
+late_initcall(take_wake_lock);