summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux/linux-openmoko/tweak_power_button.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/linux/linux-openmoko/tweak_power_button.patch')
-rw-r--r--meta/packages/linux/linux-openmoko/tweak_power_button.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-openmoko/tweak_power_button.patch b/meta/packages/linux/linux-openmoko/tweak_power_button.patch
new file mode 100644
index 0000000000..1929365756
--- /dev/null
+++ b/meta/packages/linux/linux-openmoko/tweak_power_button.patch
@@ -0,0 +1,32 @@
1Index: linux-2.6.22/drivers/i2c/chips/pcf50606.c
2===================================================================
3--- linux-2.6.22.orig/drivers/i2c/chips/pcf50606.c 2008-02-20 12:05:27.000000000 +0000
4+++ linux-2.6.22/drivers/i2c/chips/pcf50606.c 2008-02-20 12:15:24.000000000 +0000
5@@ -564,7 +564,8 @@
6 /* ONKEY falling edge (start of button press) */
7 DEBUGPC("ONKEYF ");
8 pcf->flags |= PCF50606_F_PWR_PRESSED;
9- input_report_key(pcf->input_dev, KEY_POWER, 1);
10+ input_report_key(pcf->input_dev, KEY_SUSPEND, 1);
11+ input_event(pcf->input_dev, EV_PWR, KEY_SUSPEND, 1);
12 }
13 if (int1 & PCF50606_INT1_ONKEY1S) {
14 /* ONKEY pressed for more than 1 second */
15@@ -582,7 +583,7 @@
16 DEBUGPC("ONKEYR ");
17 pcf->flags &= ~PCF50606_F_PWR_PRESSED;
18 pcf->onkey_seconds = -1;
19- input_report_key(pcf->input_dev, KEY_POWER, 0);
20+ input_report_key(pcf->input_dev, KEY_SUSPEND, 0);
21 /* disable SECOND interrupt in case RTC didn't
22 * request it */
23 if (!(pcf->flags & PCF50606_F_RTC_SECOND))
24@@ -1622,7 +1623,7 @@
25 data->input_dev->cdev.dev = &new_client->dev;
26
27 data->input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_PWR);
28- set_bit(KEY_POWER, data->input_dev->keybit);
29+ set_bit(KEY_SUSPEND, data->input_dev->keybit);
30 set_bit(KEY_POWER2, data->input_dev->keybit);
31 set_bit(KEY_BATTERY, data->input_dev->keybit);
32