diff options
author | Steven Miao <realmz6@gmail.com> | 2012-06-07 03:06:45 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-07-24 01:39:50 -0400 |
commit | bbca5c6d9e7d0b0cdecd70766b7f4698462a53e0 (patch) | |
tree | 2f0ae7bda7a814fe50f39965c255466bc678853e /arch/blackfin | |
parent | 6b6c37bf9d9295228b63a06b34fea91a02317bce (diff) |
gpiokeys: add gpio keyboard platform device
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf609/boards/ezkit.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c index b078d5a4d82e..14b73b55a48e 100644 --- a/arch/blackfin/mach-bf609/boards/ezkit.c +++ b/arch/blackfin/mach-bf609/boards/ezkit.c | |||
@@ -1098,6 +1098,28 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
1098 | }; | 1098 | }; |
1099 | #endif | 1099 | #endif |
1100 | 1100 | ||
1101 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
1102 | #include <linux/input.h> | ||
1103 | #include <linux/gpio_keys.h> | ||
1104 | |||
1105 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
1106 | {BTN_0, GPIO_PB10, 1, "gpio-keys: BTN0"}, | ||
1107 | {BTN_1, GPIO_PE1, 1, "gpio-keys: BTN1"}, | ||
1108 | }; | ||
1109 | |||
1110 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
1111 | .buttons = bfin_gpio_keys_table, | ||
1112 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
1113 | }; | ||
1114 | |||
1115 | static struct platform_device bfin_device_gpiokeys = { | ||
1116 | .name = "gpio-keys", | ||
1117 | .dev = { | ||
1118 | .platform_data = &bfin_gpio_keys_data, | ||
1119 | }, | ||
1120 | }; | ||
1121 | #endif | ||
1122 | |||
1101 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 1123 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
1102 | #if defined(CONFIG_MTD_M25P80) \ | 1124 | #if defined(CONFIG_MTD_M25P80) \ |
1103 | || defined(CONFIG_MTD_M25P80_MODULE) | 1125 | || defined(CONFIG_MTD_M25P80_MODULE) |