rk30_phonepad:support more board key definitions

This commit is contained in:
luowei 2012-09-28 14:59:43 +08:00
parent cff95822ad
commit 02d4b75ed1

View File

@ -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,
.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 = "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,
.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
};