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-bf561/boards/ezkit.c | |
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-bf561/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf561/boards/ezkit.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 4ff8f6e7a11f..edfceb08a7d5 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -246,6 +246,30 @@ static struct platform_device bfin_pata_device = { | |||
246 | }; | 246 | }; |
247 | #endif | 247 | #endif |
248 | 248 | ||
249 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
250 | #include <linux/input.h> | ||
251 | #include <linux/gpio_keys.h> | ||
252 | |||
253 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
254 | {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"}, | ||
255 | {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"}, | ||
256 | {BTN_2, GPIO_PF7, 1, "gpio-keys: BTN2"}, | ||
257 | {BTN_3, GPIO_PF8, 1, "gpio-keys: BTN3"}, | ||
258 | }; | ||
259 | |||
260 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
261 | .buttons = bfin_gpio_keys_table, | ||
262 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
263 | }; | ||
264 | |||
265 | static struct platform_device bfin_device_gpiokeys = { | ||
266 | .name = "gpio-keys", | ||
267 | .dev = { | ||
268 | .platform_data = &bfin_gpio_keys_data, | ||
269 | }, | ||
270 | }; | ||
271 | #endif | ||
272 | |||
249 | static struct platform_device *ezkit_devices[] __initdata = { | 273 | static struct platform_device *ezkit_devices[] __initdata = { |
250 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 274 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
251 | &smc91x_device, | 275 | &smc91x_device, |
@@ -258,12 +282,18 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
258 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 282 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
259 | &bfin_spi0_device, | 283 | &bfin_spi0_device, |
260 | #endif | 284 | #endif |
285 | |||
261 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 286 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
262 | &bfin_uart_device, | 287 | &bfin_uart_device, |
263 | #endif | 288 | #endif |
289 | |||
264 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 290 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
265 | &bfin_pata_device, | 291 | &bfin_pata_device, |
266 | #endif | 292 | #endif |
293 | |||
294 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
295 | &bfin_device_gpiokeys, | ||
296 | #endif | ||
267 | }; | 297 | }; |
268 | 298 | ||
269 | static int __init ezkit_init(void) | 299 | static int __init ezkit_init(void) |