rk30_phonepad:support more board key definitions
authorluowei <lw@rock-chips.com>
Fri, 28 Sep 2012 06:59:43 +0000 (14:59 +0800)
committerluowei <lw@rock-chips.com>
Fri, 28 Sep 2012 06:59:43 +0000 (14:59 +0800)
arch/arm/mach-rk30/board-rk30-phonepad-key.c

index a30ef4454d8320844096624f4d6a41acc76fd30a..0079399927be9fdc8d49daac13f8cfd29f4cb214 100755 (executable)
@@ -8,75 +8,8 @@
 #define PRESS_LEV_HIGH                 0
 
 static struct rk29_keys_button key_button[] = {
-       #if 0
-       {
-               .desc   = "menu",
-               .code   = EV_MENU,
-               .gpio   = RK30_PIN6_PA0,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "vol+",
-               .code   = KEY_VOLUMEUP,
-               .gpio   = RK30_PIN6_PA1,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "vol-",
-               .code   = KEY_VOLUMEDOWN,
-               .gpio   = RK30_PIN4_PC5,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "home",
-               .code   = KEY_HOME,
-               .gpio   = RK30_PIN6_PA3,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "search",
-               .code   = KEY_SEARCH,
-               .gpio   = RK30_PIN6_PA4,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "esc",
-               .code   = KEY_BACK,
-               .gpio   = RK30_PIN6_PA5,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "sensor",
-               .code   = KEY_CAMERA,
-               .gpio   = RK30_PIN6_PA6,
-               .active_low = PRESS_LEV_LOW,
-       },
-       #endif
-       {
-               .desc   = "play",
-               .code   = KEY_POWER,
-               .gpio   = RK30_PIN6_PA2,
-               .active_low = PRESS_LEV_LOW,
-               //.code_long_press = EV_ENCALL,
-               .wakeup = 1,
-       },
-       #if 0
-       {
-               .desc   = "vol+",
-               .code   = KEY_VOLUMEUP,
-               .adc_value      = 1,
-               .gpio = INVALID_GPIO,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "vol-",
-               .code   = KEY_VOLUMEUP,
-               .adc_value      = 249,
-               .gpio = INVALID_GPIO,
-               .active_low = PRESS_LEV_LOW,
-       },
-       #endif
-#ifdef CONFIG_MACH_RK30_PHONE_PAD
+
+#ifdef CONFIG_MACH_RK30_PHONE_PAD_DS763
        {
                .desc   = "vol+",
                .code   = KEY_VOLUMEUP,
@@ -98,34 +31,39 @@ static struct rk29_keys_button key_button[] = {
                .gpio = INVALID_GPIO,
                .active_low = PRESS_LEV_LOW,
        },
-#else
-       {
-               .desc   = "menu",
-               .code   = EV_MENU,
-               .adc_value      = 155,
-               .gpio = INVALID_GPIO,
-               .active_low = PRESS_LEV_LOW,
-       },
-       {
-               .desc   = "home",
-               .code   = KEY_HOME,
-               .adc_value      = 630,
-               .gpio = INVALID_GPIO,
-               .active_low = PRESS_LEV_LOW,
-       },
+
        {
-               .desc   = "esc",
-               .code   = KEY_BACK,
-               .adc_value      = 386,
-               .gpio = INVALID_GPIO,
+               .desc   = "play",
+               .code   = KEY_POWER,
+               .gpio   = RK30_PIN6_PA2,
                .active_low = PRESS_LEV_LOW,
+               //.code_long_press = EV_ENCALL,
+               .wakeup = 1,
        },
+#endif
+
+#ifdef CONFIG_MACH_RK30_PHONE_PAD_C8003
+        {
+                .desc   = "vol+",
+                .code   = KEY_VOLUMEUP,
+                .adc_value      = 1,
+                .gpio = INVALID_GPIO,
+                .active_low = PRESS_LEV_LOW,
+        },
+        {
+                .desc   = "vol-",
+                .code   = KEY_VOLUMEDOWN,
+                .gpio   = RK30_PIN4_PC5,
+                .active_low = PRESS_LEV_LOW,
+        },
+
        {
-               .desc   = "camera",
-               .code   = KEY_CAMERA,
-               .adc_value      = 827,
-               .gpio = INVALID_GPIO,
+               .desc   = "play",
+               .code   = KEY_POWER,
+               .gpio   = RK30_PIN6_PA2,
                .active_low = PRESS_LEV_LOW,
+               //.code_long_press = EV_ENCALL,
+               .wakeup = 1,
        },
 #endif
 };