diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-01-27 03:49:48 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2008-01-27 03:49:48 -0500 |
commit | 2463ef22bf8b6e22048bd26f940c014f7e1f0998 (patch) | |
tree | 1060c346b95a64f8aa0de77dc162903a960a5ac2 /arch/blackfin/mach-bf548 | |
parent | 6fce6a8d6940654b48d3d540627c7ee790a03b80 (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-bf548')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 856b9db06663..4ca3288fd07c 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -514,6 +514,29 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
514 | #endif | 514 | #endif |
515 | #endif | 515 | #endif |
516 | 516 | ||
517 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
518 | #include <linux/gpio_keys.h> | ||
519 | |||
520 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
521 | {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"}, | ||
522 | {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"}, | ||
523 | {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"}, | ||
524 | {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"}, | ||
525 | }; | ||
526 | |||
527 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
528 | .buttons = bfin_gpio_keys_table, | ||
529 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
530 | }; | ||
531 | |||
532 | static struct platform_device bfin_device_gpiokeys = { | ||
533 | .name = "gpio-keys", | ||
534 | .dev = { | ||
535 | .platform_data = &bfin_gpio_keys_data, | ||
536 | }, | ||
537 | }; | ||
538 | #endif | ||
539 | |||
517 | static struct platform_device *ezkit_devices[] __initdata = { | 540 | static struct platform_device *ezkit_devices[] __initdata = { |
518 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 541 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
519 | &rtc_device, | 542 | &rtc_device, |
@@ -562,6 +585,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
562 | &i2c_bfin_twi1_device, | 585 | &i2c_bfin_twi1_device, |
563 | #endif | 586 | #endif |
564 | #endif | 587 | #endif |
588 | |||
589 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
590 | &bfin_device_gpiokeys, | ||
591 | #endif | ||
565 | }; | 592 | }; |
566 | 593 | ||
567 | static int __init stamp_init(void) | 594 | static int __init stamp_init(void) |