update fih key and board
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk29 / board-rk29-fih-key.c
1 #include <mach/key.h>
2 #include <mach/gpio.h>
3 #include <mach/board.h>
4
5 #define EV_ENCALL                               KEY_F4
6 #define EV_MENU                                 KEY_F1
7
8 #define PRESS_LEV_LOW                   1
9 #define PRESS_LEV_HIGH                  0
10
11 static struct rk29_keys_button key_button[] = {
12         {
13                 .desc   = "vol+",
14                 .code   = KEY_VOLUMEUP,
15                 .gpio   = RK29_PIN6_PA1,
16                 .active_low = PRESS_LEV_LOW,
17         },
18         {
19                 .desc   = "vol-",
20                 .code   = KEY_VOLUMEDOWN,
21                 .gpio   = RK29_PIN6_PA2,
22                 .active_low = PRESS_LEV_LOW,
23         },
24         {
25                 .desc   = "play",
26                 .code   = KEY_POWER,
27                 .gpio   = RK29_PIN6_PA7,
28                 .active_low = PRESS_LEV_HIGH,
29                 .wakeup = 1,
30         },
31 };
32 struct rk29_keys_platform_data rk29_keys_pdata = {
33         .buttons        = key_button,
34         .nbuttons       = ARRAY_SIZE(key_button),
35         .chn    = -1,  //chn: 0-7, if do not use ADC,set 'chn' -1
36 };
37