mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
linux-nokia800: Add suspend/resume button support
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3838 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Linux kernel version: 2.6.21-omap1
|
# Linux kernel version: 2.6.21-omap1
|
||||||
# Wed Feb 6 17:40:31 2008
|
# Wed Feb 20 22:47:15 2008
|
||||||
#
|
#
|
||||||
CONFIG_ARM=y
|
CONFIG_ARM=y
|
||||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||||
@@ -517,7 +517,6 @@ CONFIG_MTD_BLOCK=y
|
|||||||
# CONFIG_INFTL is not set
|
# CONFIG_INFTL is not set
|
||||||
# CONFIG_RFD_FTL is not set
|
# CONFIG_RFD_FTL is not set
|
||||||
# CONFIG_SSFDC is not set
|
# CONFIG_SSFDC is not set
|
||||||
# CONFIG_MTD_OOPS is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# RAM/ROM/Flash chip drivers
|
# RAM/ROM/Flash chip drivers
|
||||||
@@ -752,6 +751,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
|
|||||||
# CONFIG_INPUT_TSDEV is not set
|
# CONFIG_INPUT_TSDEV is not set
|
||||||
CONFIG_INPUT_EVDEV=y
|
CONFIG_INPUT_EVDEV=y
|
||||||
# CONFIG_INPUT_EVBUG is not set
|
# CONFIG_INPUT_EVBUG is not set
|
||||||
|
CONFIG_INPUT_POWER=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Input Device Drivers
|
# Input Device Drivers
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
Index: linux-2.6.21/drivers/cbus/retu-pwrbutton.c
|
||||||
|
===================================================================
|
||||||
|
--- linux-2.6.21.orig/drivers/cbus/retu-pwrbutton.c 2008-02-20 22:44:18.000000000 +0000
|
||||||
|
+++ linux-2.6.21/drivers/cbus/retu-pwrbutton.c 2008-02-20 22:46:22.000000000 +0000
|
||||||
|
@@ -53,7 +53,9 @@
|
||||||
|
state = PWRBTN_PRESSED;
|
||||||
|
|
||||||
|
if (pwrbtn_state != state) {
|
||||||
|
- input_report_key(pwrbtn_dev, KEY_POWER, state);
|
||||||
|
+ input_report_key(pwrbtn_dev, KEY_SUSPEND, state);
|
||||||
|
+ if (state == PWRBTN_PRESSED)
|
||||||
|
+ input_event(pwrbtn_dev, EV_PWR, KEY_SUSPEND, 1);
|
||||||
|
pwrbtn_state = state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -92,8 +94,8 @@
|
||||||
|
if (!pwrbtn_dev)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
- pwrbtn_dev->evbit[0] = BIT(EV_KEY);
|
||||||
|
- pwrbtn_dev->keybit[LONG(KEY_POWER)] = BIT(KEY_POWER);
|
||||||
|
+ pwrbtn_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR);
|
||||||
|
+ pwrbtn_dev->keybit[LONG(KEY_SUSPEND)] = BIT(KEY_SUSPEND);
|
||||||
|
pwrbtn_dev->name = "retu-pwrbutton";
|
||||||
|
|
||||||
|
input_register_device(pwrbtn_dev);
|
||||||
|
Index: linux-2.6.21/drivers/char/apm-emulation.c
|
||||||
|
===================================================================
|
||||||
|
--- linux-2.6.21.orig/drivers/char/apm-emulation.c 2008-02-21 00:32:41.000000000 +0000
|
||||||
|
+++ linux-2.6.21/drivers/char/apm-emulation.c 2008-02-21 00:33:43.000000000 +0000
|
||||||
|
@@ -206,10 +206,18 @@
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static in_suspend;
|
||||||
|
+
|
||||||
|
static void apm_suspend(void)
|
||||||
|
{
|
||||||
|
struct apm_user *as;
|
||||||
|
- int err = pm_suspend(PM_SUSPEND_MEM);
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ in_suspend = 1;
|
||||||
|
+
|
||||||
|
+ err = pm_suspend(PM_SUSPEND_MEM);
|
||||||
|
+
|
||||||
|
+ in_suspend = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Anyone on the APM queues will think we're still suspended.
|
||||||
|
@@ -663,6 +671,9 @@
|
||||||
|
{
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
+ if (in_suspend)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
spin_lock_irqsave(&kapmd_queue_lock, flags);
|
||||||
|
queue_add_event(&kapmd_queue, event);
|
||||||
|
spin_unlock_irqrestore(&kapmd_queue_lock, flags);
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
require linux-nokia800.inc
|
require linux-nokia800.inc
|
||||||
PR = "r1"
|
PR = "r3"
|
||||||
|
|
||||||
DEFAULT_PREFERENCE = "-1"
|
DEFAULT_PREFERENCE_nokia770 = "-1"
|
||||||
DEFAULT_PREFERENCE_nokia800 = "1"
|
|
||||||
|
|
||||||
SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 \
|
SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 \
|
||||||
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 \
|
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 \
|
||||||
|
http://www.rpsys.net/openzaurus/patches/archive/input_power-r7.patch;patch=1 \
|
||||||
|
file://suspend-button.patch;patch=1 \
|
||||||
file://defconfig"
|
file://defconfig"
|
||||||
|
|
||||||
S = "${WORKDIR}/linux-2.6.21"
|
S = "${WORKDIR}/linux-2.6.21"
|
||||||
|
|||||||
Reference in New Issue
Block a user