diff options
Diffstat (limited to 'arch/blackfin/mach-bf533/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index be852034a68b..c37dd45c8803 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -256,6 +256,50 @@ static struct platform_device bfin_pata_device = { | |||
256 | }; | 256 | }; |
257 | #endif | 257 | #endif |
258 | 258 | ||
259 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
260 | #include <linux/input.h> | ||
261 | #include <linux/gpio_keys.h> | ||
262 | |||
263 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
264 | {BTN_0, GPIO_PF7, 1, "gpio-keys: BTN0"}, | ||
265 | {BTN_1, GPIO_PF8, 1, "gpio-keys: BTN1"}, | ||
266 | {BTN_2, GPIO_PF9, 1, "gpio-keys: BTN2"}, | ||
267 | {BTN_3, GPIO_PF10, 1, "gpio-keys: BTN3"}, | ||
268 | }; | ||
269 | |||
270 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
271 | .buttons = bfin_gpio_keys_table, | ||
272 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
273 | }; | ||
274 | |||
275 | static struct platform_device bfin_device_gpiokeys = { | ||
276 | .name = "gpio-keys", | ||
277 | .dev = { | ||
278 | .platform_data = &bfin_gpio_keys_data, | ||
279 | }, | ||
280 | }; | ||
281 | #endif | ||
282 | |||
283 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
284 | #include <linux/i2c-gpio.h> | ||
285 | |||
286 | static struct i2c_gpio_platform_data i2c_gpio_data = { | ||
287 | .sda_pin = 1, | ||
288 | .scl_pin = 0, | ||
289 | .sda_is_open_drain = 0, | ||
290 | .scl_is_open_drain = 0, | ||
291 | .udelay = 40, | ||
292 | }; | ||
293 | |||
294 | static struct platform_device i2c_gpio_device = { | ||
295 | .name = "i2c-gpio", | ||
296 | .id = 0, | ||
297 | .dev = { | ||
298 | .platform_data = &i2c_gpio_data, | ||
299 | }, | ||
300 | }; | ||
301 | #endif | ||
302 | |||
259 | static struct platform_device *ezkit_devices[] __initdata = { | 303 | static struct platform_device *ezkit_devices[] __initdata = { |
260 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 304 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
261 | &smc91x_device, | 305 | &smc91x_device, |
@@ -280,6 +324,14 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
280 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 324 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
281 | &bfin_pata_device, | 325 | &bfin_pata_device, |
282 | #endif | 326 | #endif |
327 | |||
328 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
329 | &bfin_device_gpiokeys, | ||
330 | #endif | ||
331 | |||
332 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
333 | &i2c_gpio_device, | ||
334 | #endif | ||
283 | }; | 335 | }; |
284 | 336 | ||
285 | static int __init ezkit_init(void) | 337 | static int __init ezkit_init(void) |