[kernel] refresh 2.6.32 patches
[openwrt.git] / target / linux / goldfish / patches-2.6.30 / 0121--ARM-goldfish-Implement-suspend-as-wait-for-interr.patch
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.
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=utf-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Mike A. Chan <mikechan@google.com>
10 Signed-off-by: Arve Hjønnevåg <arve@android.com>
11 ---
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
16
17 --- a/arch/arm/mach-goldfish/Makefile
18 +++ b/arch/arm/mach-goldfish/Makefile
19 @@ -4,6 +4,6 @@
20
21 # Object file lists.
22
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
26
27 --- /dev/null
28 +++ b/arch/arm/mach-goldfish/pm.c
29 @@ -0,0 +1,43 @@
30 +/* arch/arm/mach-msm/pm.c
31 + *
32 + * Goldfish Power Management Routines
33 + *
34 + * Copyright (C) 2007 Google, Inc.
35 + *
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.
39 + *
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.
44 + *
45 + */
46 +
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>
53 +
54 +static int goldfish_pm_enter(suspend_state_t state)
55 +{
56 + arch_idle();
57 + return 0;
58 +}
59 +
60 +static struct platform_suspend_ops goldfish_pm_ops = {
61 + .enter = goldfish_pm_enter,
62 + .valid = suspend_valid_only_mem,
63 +};
64 +
65 +static int __init goldfish_pm_init(void)
66 +{
67 + suspend_set_ops(&goldfish_pm_ops);
68 + return 0;
69 +}
70 +
71 +__initcall(goldfish_pm_init);
72 +
This page took 0.050776 seconds and 5 git commands to generate.