linux-ezx: remove old kernel, update 2.6.21 and add script to generate SRC_URI from...
[openembedded.git] / packages / linux / linux-ezx-2.6.21 / patches / e680-locksw.patch
1 Index: linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c
2 ===================================================================
3 --- linux-2.6.21.orig/arch/arm/mach-pxa/ezx-e680.c      2007-06-08 18:38:48.000000000 +0200
4 +++ linux-2.6.21/arch/arm/mach-pxa/ezx-e680.c   2007-06-08 18:38:59.000000000 +0200
5 @@ -16,6 +16,7 @@
6  #include <linux/mmc/host.h>
7  #include <linux/irq.h>
8  #include <linux/input.h>
9 +#include <linux/gpio_keys.h>
10  
11  #include <asm/mach-types.h>
12  #include <asm/mach/arch.h>
13 @@ -220,8 +221,30 @@
14         },
15  };
16  
17 +static struct gpio_keys_button e680locksw_buttons[] = {
18 +       [0] = {
19 +               .keycode        = KEY_SLEEP,
20 +               .gpio           = GPIO_LOCK_SCREEN_PIN,
21 +               .desc           = "E680 lockscreen sw",
22 +       },
23 +};
24 +
25 +static struct gpio_keys_platform_data e680locksw_platform_data = {
26 +       .buttons        = e680locksw_buttons,
27 +       .nbuttons       = 1,
28 +};
29 +
30 +static struct platform_device e680locksw_device = {
31 +       .name           = "gpio-keys",
32 +       .id             = -1,
33 +       .dev            = {
34 +               .platform_data  = &e680locksw_platform_data,
35 +       },
36 +};
37 +
38  static struct platform_device *devices[] __initdata = {
39         &pcap_ts_device,
40 +       &e680locksw_device,
41  };
42  
43  static void __init e680_init(void)