summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-02-21 00:57:43 +0000
committerRichard Purdie <richard@openedhand.com>2008-02-21 00:57:43 +0000
commit2e7d772b7e0e4941ea9ea9a4284fe1563a52aa03 (patch)
tree44066211e59c205584a463605a9446d4a2c00ffe /meta/packages
parentd1a1ed1d523276cc370b818b1e408af743165e60 (diff)
downloadpoky-2e7d772b7e0e4941ea9ea9a4284fe1563a52aa03.tar.gz
linux-nokia800: Add suspend/resume button support
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3838 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/linux/linux-nokia800-2.6.21-osso71/nokia800/defconfig4
-rw-r--r--meta/packages/linux/linux-nokia800-2.6.21-osso71/suspend-button.patch60
-rw-r--r--meta/packages/linux/linux-nokia800_2.6.21-osso71.bb7
3 files changed, 66 insertions, 5 deletions
diff --git a/meta/packages/linux/linux-nokia800-2.6.21-osso71/nokia800/defconfig b/meta/packages/linux/linux-nokia800-2.6.21-osso71/nokia800/defconfig
index b1af97af35..f5a2df4c5b 100644
--- a/meta/packages/linux/linux-nokia800-2.6.21-osso71/nokia800/defconfig
+++ b/meta/packages/linux/linux-nokia800-2.6.21-osso71/nokia800/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.21-omap1 3# Linux kernel version: 2.6.21-omap1
4# Wed Feb 6 17:40:31 2008 4# Wed Feb 20 22:47:15 2008
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_SYS_SUPPORTS_APM_EMULATION=y 7CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -517,7 +517,6 @@ CONFIG_MTD_BLOCK=y
517# CONFIG_INFTL is not set 517# CONFIG_INFTL is not set
518# CONFIG_RFD_FTL is not set 518# CONFIG_RFD_FTL is not set
519# CONFIG_SSFDC is not set 519# CONFIG_SSFDC is not set
520# CONFIG_MTD_OOPS is not set
521 520
522# 521#
523# RAM/ROM/Flash chip drivers 522# RAM/ROM/Flash chip drivers
@@ -752,6 +751,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
752# CONFIG_INPUT_TSDEV is not set 751# CONFIG_INPUT_TSDEV is not set
753CONFIG_INPUT_EVDEV=y 752CONFIG_INPUT_EVDEV=y
754# CONFIG_INPUT_EVBUG is not set 753# CONFIG_INPUT_EVBUG is not set
754CONFIG_INPUT_POWER=y
755 755
756# 756#
757# Input Device Drivers 757# Input Device Drivers
diff --git a/meta/packages/linux/linux-nokia800-2.6.21-osso71/suspend-button.patch b/meta/packages/linux/linux-nokia800-2.6.21-osso71/suspend-button.patch
new file mode 100644
index 0000000000..791a66e02a
--- /dev/null
+++ b/meta/packages/linux/linux-nokia800-2.6.21-osso71/suspend-button.patch
@@ -0,0 +1,60 @@
1Index: linux-2.6.21/drivers/cbus/retu-pwrbutton.c
2===================================================================
3--- linux-2.6.21.orig/drivers/cbus/retu-pwrbutton.c 2008-02-20 22:44:18.000000000 +0000
4+++ linux-2.6.21/drivers/cbus/retu-pwrbutton.c 2008-02-20 22:46:22.000000000 +0000
5@@ -53,7 +53,9 @@
6 state = PWRBTN_PRESSED;
7
8 if (pwrbtn_state != state) {
9- input_report_key(pwrbtn_dev, KEY_POWER, state);
10+ input_report_key(pwrbtn_dev, KEY_SUSPEND, state);
11+ if (state == PWRBTN_PRESSED)
12+ input_event(pwrbtn_dev, EV_PWR, KEY_SUSPEND, 1);
13 pwrbtn_state = state;
14 }
15 }
16@@ -92,8 +94,8 @@
17 if (!pwrbtn_dev)
18 return -ENOMEM;
19
20- pwrbtn_dev->evbit[0] = BIT(EV_KEY);
21- pwrbtn_dev->keybit[LONG(KEY_POWER)] = BIT(KEY_POWER);
22+ pwrbtn_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR);
23+ pwrbtn_dev->keybit[LONG(KEY_SUSPEND)] = BIT(KEY_SUSPEND);
24 pwrbtn_dev->name = "retu-pwrbutton";
25
26 input_register_device(pwrbtn_dev);
27Index: linux-2.6.21/drivers/char/apm-emulation.c
28===================================================================
29--- linux-2.6.21.orig/drivers/char/apm-emulation.c 2008-02-21 00:32:41.000000000 +0000
30+++ linux-2.6.21/drivers/char/apm-emulation.c 2008-02-21 00:33:43.000000000 +0000
31@@ -206,10 +206,18 @@
32 return ret;
33 }
34
35+static in_suspend;
36+
37 static void apm_suspend(void)
38 {
39 struct apm_user *as;
40- int err = pm_suspend(PM_SUSPEND_MEM);
41+ int err;
42+
43+ in_suspend = 1;
44+
45+ err = pm_suspend(PM_SUSPEND_MEM);
46+
47+ in_suspend = 0;
48
49 /*
50 * Anyone on the APM queues will think we're still suspended.
51@@ -663,6 +671,9 @@
52 {
53 unsigned long flags;
54
55+ if (in_suspend)
56+ return;
57+
58 spin_lock_irqsave(&kapmd_queue_lock, flags);
59 queue_add_event(&kapmd_queue, event);
60 spin_unlock_irqrestore(&kapmd_queue_lock, flags);
diff --git a/meta/packages/linux/linux-nokia800_2.6.21-osso71.bb b/meta/packages/linux/linux-nokia800_2.6.21-osso71.bb
index 34cc82a842..7b633635b8 100644
--- a/meta/packages/linux/linux-nokia800_2.6.21-osso71.bb
+++ b/meta/packages/linux/linux-nokia800_2.6.21-osso71.bb
@@ -1,11 +1,12 @@
1require linux-nokia800.inc 1require linux-nokia800.inc
2PR = "r1" 2PR = "r3"
3 3
4DEFAULT_PREFERENCE = "-1" 4DEFAULT_PREFERENCE_nokia770 = "-1"
5DEFAULT_PREFERENCE_nokia800 = "1"
6 5
7SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 \ 6SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 \
8 http://repository.maemo.org/pool/os2008/free/source/k/kernel-source-rx-34/kernel-source-rx-34_2.6.21.0-osso71.diff.gz;patch=1 \ 7 http://repository.maemo.org/pool/os2008/free/source/k/kernel-source-rx-34/kernel-source-rx-34_2.6.21.0-osso71.diff.gz;patch=1 \
8 http://www.rpsys.net/openzaurus/patches/archive/input_power-r7.patch;patch=1 \
9 file://suspend-button.patch;patch=1 \
9 file://defconfig" 10 file://defconfig"
10 11
11S = "${WORKDIR}/linux-2.6.21" 12S = "${WORKDIR}/linux-2.6.21"