aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2008-01-27 03:49:48 -0500
committerBryan Wu <bryan.wu@analog.com>2008-01-27 03:49:48 -0500
commit2463ef22bf8b6e22048bd26f940c014f7e1f0998 (patch)
tree1060c346b95a64f8aa0de77dc162903a960a5ac2 /arch/blackfin/mach-bf537
parent6fce6a8d6940654b48d3d540627c7ee790a03b80 (diff)
[Blackfin] arch: replace current blackfin specific pfbutton driver with kernel generic gpio key driver
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 07b0dc273d2f..3e0ad04d8d75 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -103,6 +103,30 @@ void __exit bfin_isp1761_exit(void)
103arch_initcall(bfin_isp1761_init); 103arch_initcall(bfin_isp1761_init);
104#endif 104#endif
105 105
106#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
107#include <linux/input.h>
108#include <linux/gpio_keys.h>
109
110static struct gpio_keys_button bfin_gpio_keys_table[] = {
111 {BTN_0, GPIO_PF2, 1, "gpio-keys: BTN0"},
112 {BTN_1, GPIO_PF3, 1, "gpio-keys: BTN1"},
113 {BTN_2, GPIO_PF4, 1, "gpio-keys: BTN2"},
114 {BTN_3, GPIO_PF5, 1, "gpio-keys: BTN3"},
115};
116
117static struct gpio_keys_platform_data bfin_gpio_keys_data = {
118 .buttons = bfin_gpio_keys_table,
119 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
120};
121
122static struct platform_device bfin_device_gpiokeys = {
123 .name = "gpio-keys",
124 .dev = {
125 .platform_data = &bfin_gpio_keys_data,
126 },
127};
128#endif
129
106#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 130#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
107static struct resource bfin_pcmcia_cf_resources[] = { 131static struct resource bfin_pcmcia_cf_resources[] = {
108 { 132 {
@@ -738,6 +762,10 @@ static struct platform_device *stamp_devices[] __initdata = {
738#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 762#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
739 &bfin_pata_device, 763 &bfin_pata_device,
740#endif 764#endif
765
766#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
767 &bfin_device_gpiokeys,
768#endif
741}; 769};
742 770
743static int __init stamp_init(void) 771static int __init stamp_init(void)