rk3168: modidied key map in rk3168 top board
authorhxy <hxy@rock-chips.com>
Tue, 25 Dec 2012 09:39:56 +0000 (17:39 +0800)
committerhxy <hxy@rock-chips.com>
Tue, 25 Dec 2012 09:39:56 +0000 (17:39 +0800)
arch/arm/mach-rk30/board-rk3168-tb.c

index fcfdbb881c9cd080d8a91634c96bf954bf7e52dd..ecbf6568bc811954c626832312b3501b35e0cead 100644 (file)
@@ -83,7 +83,6 @@
 #endif
 
 #include "board-rk3168-tb-camera.c"
-#include "board-rk3066b-sdk-key.c"
 
 #if defined(CONFIG_TOUCHSCREEN_GT8XX)
 #define TOUCH_RESET_PIN  RK30_PIN0_PB6
@@ -1826,6 +1825,77 @@ static void __init rk30_i2c_register_board_info(void)
 }
 //end of i2c
 
+// ========== Begin of rk3168 top board keypad defination ============
+
+#include <mach/gpio.h>
+#include <plat/key.h>
+
+#define EV_ENCALL                               KEY_F4
+#define EV_MENU                                 KEY_F1
+
+#define PRESS_LEV_LOW                   1
+#define PRESS_LEV_HIGH                  0
+
+static struct rk29_keys_button key_button[] = {
+        {
+                .desc   = "vol-",
+                .code   = KEY_VOLUMEDOWN,
+               .adc_value      = 900,
+                .gpio   = INVALID_GPIO,
+                .active_low = PRESS_LEV_LOW,
+        },
+        {
+                .desc   = "play",
+                .code   = KEY_POWER,
+                .gpio   = RK30_PIN0_PA4,
+                .active_low = PRESS_LEV_LOW,
+                .wakeup = 1,
+        },
+        {
+                .desc   = "vol+",
+                .code   = KEY_VOLUMEUP,
+                .adc_value      = 1,
+                .gpio = INVALID_GPIO,
+                .active_low = PRESS_LEV_LOW,
+        },
+       {
+                .desc   = "menu",
+                .code   = EV_MENU,
+                .adc_value      = 133,
+                .gpio = INVALID_GPIO,
+                .active_low = PRESS_LEV_LOW,
+        },
+        {
+                .desc   = "home",
+                .code   = KEY_HOME,
+                .adc_value      = 550,
+                .gpio = INVALID_GPIO,
+                .active_low = PRESS_LEV_LOW,
+        },
+        {
+                .desc   = "esc",
+                .code   = KEY_BACK,
+                .adc_value      = 333,
+               .gpio = INVALID_GPIO,
+               .active_low = PRESS_LEV_LOW,
+       },
+       {
+               .desc   = "camera",
+               .code   = KEY_CAMERA,
+               .adc_value      = 742,
+               .gpio = INVALID_GPIO,
+               .active_low = PRESS_LEV_LOW,
+       },
+};
+struct rk29_keys_platform_data rk29_keys_pdata = {
+       .buttons        = key_button,
+       .nbuttons       = ARRAY_SIZE(key_button),
+       .chn    = 1,  //chn: 0-7, if do not use ADC,set 'chn' -1
+};
+
+// =========== End of rk3168 top board keypad defination  =============
+
+
 #define POWER_ON_PIN RK30_PIN0_PA0   //power_hold
 static void rk30_pm_power_off(void)
 {