From: kfx Date: Wed, 8 Feb 2012 03:47:32 +0000 (+0800) Subject: rename: board-rk30sdk-key.c --> board-rk30-sdk-key.c X-Git-Tag: firefly_0821_release~9595^2~162 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d65437a9b7915133d3eff9b96d542b51fd5792f0;p=firefly-linux-kernel-4.4.55.git rename: board-rk30sdk-key.c --> board-rk30-sdk-key.c --- diff --git a/arch/arm/mach-rk29/include/mach/key.h b/arch/arm/mach-rk29/include/mach/key.h index 37ee59ea18af..903baa571183 100755 --- a/arch/arm/mach-rk29/include/mach/key.h +++ b/arch/arm/mach-rk29/include/mach/key.h @@ -1,4 +1 @@ -#ifndef __RK29_KEYS_H__ -#define __RK29_KEYS_H__ #include -#endif diff --git a/arch/arm/mach-rk30/Makefile b/arch/arm/mach-rk30/Makefile index e925782826dc..032b9d072e52 100644 --- a/arch/arm/mach-rk30/Makefile +++ b/arch/arm/mach-rk30/Makefile @@ -10,4 +10,4 @@ ifndef CONFIG_DEBUG_LL obj-y += ../kernel/debug.o endif obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o -obj-$(CONFIG_MACH_RK30_SDK) += board-rk30-sdk.o board-rk30sdk-key.o +obj-$(CONFIG_MACH_RK30_SDK) += board-rk30-sdk.o board-rk30-sdk-key.o diff --git a/arch/arm/mach-rk30/board-rk30-sdk-key.c b/arch/arm/mach-rk30/board-rk30-sdk-key.c new file mode 100755 index 000000000000..0a8a1095166c --- /dev/null +++ b/arch/arm/mach-rk30/board-rk30-sdk-key.c @@ -0,0 +1,113 @@ +#include +#include + +#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 = "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_PIN6_PA2, + .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, + }, + { + .desc = "play", + .code = KEY_POWER, + .gpio = RK30_PIN6_PA7, + .active_low = PRESS_LEV_LOW, + //.code_long_press = EV_ENCALL, + .wakeup = 1, + }, +#if 0 + { + .desc = "vol+", + .code = KEY_VOLUMEDOWN, + .adc_value = 95, + .gpio = INVALID_GPIO, + .active_low = PRESS_LEV_LOW, + }, + { + .desc = "vol-", + .code = KEY_VOLUMEUP, + .adc_value = 249, + .gpio = INVALID_GPIO, + .active_low = PRESS_LEV_LOW, + }, + { + .desc = "menu", + .code = EV_MENU, + .adc_value = 406, + .gpio = INVALID_GPIO, + .active_low = PRESS_LEV_LOW, + }, + { + .desc = "home", + .code = KEY_HOME, + .code_long_press = KEY_F4, + .adc_value = 561, + .gpio = INVALID_GPIO, + .active_low = PRESS_LEV_LOW, + }, + { + .desc = "esc", + .code = KEY_ESC, + .adc_value = 726, + .gpio = INVALID_GPIO, + .active_low = PRESS_LEV_LOW, + }, + { + .desc = "adkey6", + .code = KEY_BACK, + .code_long_press = EV_ENCALL, + .adc_value = 899, + .gpio = INVALID_GPIO, + .active_low = PRESS_LEV_LOW, + }, +#endif +}; +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 +}; + diff --git a/arch/arm/mach-rk30/board-rk30sdk-key.c b/arch/arm/mach-rk30/board-rk30sdk-key.c deleted file mode 100755 index 0a8a1095166c..000000000000 --- a/arch/arm/mach-rk30/board-rk30sdk-key.c +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include - -#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 = "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_PIN6_PA2, - .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, - }, - { - .desc = "play", - .code = KEY_POWER, - .gpio = RK30_PIN6_PA7, - .active_low = PRESS_LEV_LOW, - //.code_long_press = EV_ENCALL, - .wakeup = 1, - }, -#if 0 - { - .desc = "vol+", - .code = KEY_VOLUMEDOWN, - .adc_value = 95, - .gpio = INVALID_GPIO, - .active_low = PRESS_LEV_LOW, - }, - { - .desc = "vol-", - .code = KEY_VOLUMEUP, - .adc_value = 249, - .gpio = INVALID_GPIO, - .active_low = PRESS_LEV_LOW, - }, - { - .desc = "menu", - .code = EV_MENU, - .adc_value = 406, - .gpio = INVALID_GPIO, - .active_low = PRESS_LEV_LOW, - }, - { - .desc = "home", - .code = KEY_HOME, - .code_long_press = KEY_F4, - .adc_value = 561, - .gpio = INVALID_GPIO, - .active_low = PRESS_LEV_LOW, - }, - { - .desc = "esc", - .code = KEY_ESC, - .adc_value = 726, - .gpio = INVALID_GPIO, - .active_low = PRESS_LEV_LOW, - }, - { - .desc = "adkey6", - .code = KEY_BACK, - .code_long_press = EV_ENCALL, - .adc_value = 899, - .gpio = INVALID_GPIO, - .active_low = PRESS_LEV_LOW, - }, -#endif -}; -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 -}; -