aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533/boards/stamp.c
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-bf533/boards/stamp.c
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-bf533/boards/stamp.c')
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 8fde8d832850..689816937703 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -373,6 +373,29 @@ static struct platform_device bfin_pata_device = {
373}; 373};
374#endif 374#endif
375 375
376#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
377#include <linux/input.h>
378#include <linux/gpio_keys.h>
379
380static struct gpio_keys_button bfin_gpio_keys_table[] = {
381 {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"},
382 {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"},
383 {BTN_2, GPIO_PF8, 1, "gpio-keys: BTN2"},
384};
385
386static struct gpio_keys_platform_data bfin_gpio_keys_data = {
387 .buttons = bfin_gpio_keys_table,
388 .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
389};
390
391static struct platform_device bfin_device_gpiokeys = {
392 .name = "gpio-keys",
393 .dev = {
394 .platform_data = &bfin_gpio_keys_data,
395 },
396};
397#endif
398
376static struct platform_device *stamp_devices[] __initdata = { 399static struct platform_device *stamp_devices[] __initdata = {
377#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 400#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
378 &rtc_device, 401 &rtc_device,
@@ -406,6 +429,10 @@ static struct platform_device *stamp_devices[] __initdata = {
406#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 429#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
407 &bfin_pata_device, 430 &bfin_pata_device,
408#endif 431#endif
432
433#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
434 &bfin_device_gpiokeys,
435#endif
409}; 436};
410 437
411static int __init stamp_init(void) 438static int __init stamp_init(void)