aboutsummaryrefslogtreecommitdiffstats
path: root/packages/linux/linux-ezx-2.6.21/patches/a780-flip.patch
blob: 88f15041dbd4a750b962d056c582f39ab54388d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Index: linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c
===================================================================
--- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-a780.c	2007-08-31 23:58:17.000000000 -0300
+++ linux-2.6.21/arch/arm/mach-pxa/ezx-a780.c	2007-08-31 23:59:03.000000000 -0300
@@ -17,6 +17,7 @@
 #include <linux/mmc/host.h>
 #include <linux/irq.h>
 #include <linux/input.h>
+#include <linux/gpio_keys.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -311,10 +312,33 @@
 	.resource       = pcap_ts_resources,
 };
 
+static struct gpio_keys_button a780flip_buttons[] = {
+       [0] = {
+               .keycode        = KEY_SLEEP,
+               .gpio           = GPIO_FLIP_PIN,
+               .desc           = "A780 flip",
+       },
+};
+
+static struct gpio_keys_platform_data a780flip_platform_data = {
+       .buttons        = a780flip_buttons,
+       .nbuttons       = 1,
+};
+
+static struct platform_device a780flip_device = {
+       .name           = "gpio-keys",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &a780flip_platform_data,
+       },
+};
+
+
 static struct platform_device *devices[] __initdata = {
 	&a780_pcap_device,
 	&a780_emu_device,
 	&pcap_ts_device,
+	&a780flip_device,
 };
 
 static void __init a780_init(void)