From: Rickard Andersson <rickard.andersson@stericsson.com>
To: rjw@sisk.pl, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: hongbo.zhang@linaro.org, ulf.hansson@linaro.org,
khilman@linaro.org, linus.walleij@stericsson.com,
daniel.lezcano@linaro.org, rickard.andersson@stericsson.com
Subject: [PATCH V2 02/12] ARM: ux500: Add platform suspend ops
Date: Thu, 28 Mar 2013 17:11:28 +0100 [thread overview]
Message-ID: <1364487098-10319-3-git-send-email-rickard.andersson@stericsson.com> (raw)
In-Reply-To: <1364487098-10319-1-git-send-email-rickard.andersson@stericsson.com>
Support for platform suspend operation
WFI (Wait For Interrupt) is added.
Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com>
---
arch/arm/mach-ux500/Makefile | 1 +
arch/arm/mach-ux500/suspend.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 arch/arm/mach-ux500/suspend.c
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index f24710d..f182cc21 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -5,6 +5,7 @@
obj-y := cpu.o devices.o devices-common.o \
id.o usb.o timer.o
obj-$(CONFIG_CPU_IDLE) += cpuidle.o
+obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
diff --git a/arch/arm/mach-ux500/suspend.c b/arch/arm/mach-ux500/suspend.c
new file mode 100644
index 0000000..d1ac203
--- /dev/null
+++ b/arch/arm/mach-ux500/suspend.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) STMicroelectronics 2009
+ * Copyright (C) ST-Ericsson SA 2010-2013
+ *
+ * License Terms: GNU General Public License v2
+ *
+ * Authors: Rickard Andersson <rickard.andersson@stericsson.com>,
+ * Jonas Aaberg <jonas.aberg@stericsson.com>,
+ * Sundar Iyer for ST-Ericsson.
+ */
+
+#include <linux/suspend.h>
+
+static int ux500_suspend_enter(suspend_state_t state)
+{
+ cpu_do_idle();
+ return 0;
+}
+
+static int ux500_suspend_valid(suspend_state_t state)
+{
+ return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY;
+}
+
+static const struct platform_suspend_ops ux500_suspend_ops = {
+ .enter = ux500_suspend_enter,
+ .valid = ux500_suspend_valid,
+};
+
+static __init int ux500_suspend_init(void)
+{
+ suspend_set_ops(&ux500_suspend_ops);
+ return 0;
+}
+device_initcall(ux500_suspend_init);
--
1.8.2
next prev parent reply other threads:[~2013-03-28 16:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 16:11 [PATCH V2 00/12] ux500 suspend-resume Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 01/12] mfd: db8500: Add IO force function Rickard Andersson
2013-03-28 16:11 ` Rickard Andersson [this message]
2013-03-28 16:11 ` [PATCH V2 03/12] PM / Domains: Add on-off notifiers Rickard Andersson
2013-03-30 23:17 ` Rafael J. Wysocki
2013-04-23 12:26 ` Rickard Andersson
2013-04-29 12:14 ` Linus Walleij
2013-04-30 12:55 ` Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 04/12] PM / Domains: Lookup domain by name Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 05/12] ARM: ux500: Create APE generic power domain Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 06/12] clk: ux500: Add PRCC power management Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 07/12] ARM: ux500: Create u8500-clk device Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 08/12] ARM: ux500: Add ApSleep state to suspend Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 09/12] drivers: bus: ux500: Add ICN driver Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 10/12] ARM: ux500: Create ICN device Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 11/12] misc: ux500: Add TPIU driver Rickard Andersson
2013-03-28 16:11 ` [PATCH V2 12/12] ARM: ux500: Create TPIU device Rickard Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1364487098-10319-3-git-send-email-rickard.andersson@stericsson.com \
--to=rickard.andersson@stericsson.com \
--cc=daniel.lezcano@linaro.org \
--cc=hongbo.zhang@linaro.org \
--cc=khilman@linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).