1 From f0266de1899f043daff3b472b8fdd6e30012cb25 Mon Sep 17 00:00:00 2001
2 From: =?utf-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
3 Date: Wed, 9 Jan 2008 11:46:33 -0800
4 Subject: [PATCH 121/134] [ARM] goldfish: Implement suspend as wait-for-interrupt.
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
9 Signed-off-by: Mike A. Chan <mikechan@google.com>
10 Signed-off-by: Arve Hjønnevåg <arve@android.com>
12 arch/arm/mach-goldfish/Makefile | 2 +-
13 arch/arm/mach-goldfish/pm.c | 43 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 44 insertions(+), 1 deletions(-)
15 create mode 100644 arch/arm/mach-goldfish/pm.c
17 --- a/arch/arm/mach-goldfish/Makefile
18 +++ b/arch/arm/mach-goldfish/Makefile
23 -obj-y := pdev_bus.o timer.o audio.o
24 +obj-y := pdev_bus.o timer.o audio.o pm.o
25 obj-$(CONFIG_MACH_GOLDFISH) += board-goldfish.o
28 +++ b/arch/arm/mach-goldfish/pm.c
30 +/* arch/arm/mach-msm/pm.c
32 + * Goldfish Power Management Routines
34 + * Copyright (C) 2007 Google, Inc.
36 + * This software is licensed under the terms of the GNU General Public
37 + * License version 2, as published by the Free Software Foundation, and
38 + * may be copied, distributed, and modified under those terms.
40 + * This program is distributed in the hope that it will be useful,
41 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
42 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
43 + * GNU General Public License for more details.
47 +#include <linux/module.h>
48 +#include <linux/kernel.h>
49 +#include <linux/init.h>
50 +#include <linux/pm.h>
51 +#include <linux/suspend.h>
52 +#include <mach/system.h>
54 +static int goldfish_pm_enter(suspend_state_t state)
60 +static struct platform_suspend_ops goldfish_pm_ops = {
61 + .enter = goldfish_pm_enter,
62 + .valid = suspend_valid_only_mem,
65 +static int __init goldfish_pm_init(void)
67 + suspend_set_ops(&goldfish_pm_ops);
71 +__initcall(goldfish_pm_init);