Advertisement
Guest User

ea313x.c

a guest
Aug 23rd, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. //für gpio_keys
  2.  
  3. static struct gpio_keys_button gpio_buttons[] = {
  4. {
  5. .code = BTN_EXTRA,
  6. .gpio = GPIO_GPIO11,
  7. .desc = "usergpio",
  8. .wakeup = 1,
  9. },
  10.  
  11.  
  12. };
  13.  
  14. static struct gpio_keys_platform_data gpio_key_info = {
  15. .buttons = gpio_buttons,
  16. .nbuttons = ARRAY_SIZE(gpio_buttons),
  17. };
  18.  
  19. static struct platform_device keys_gpio = {
  20. .name = "gpio-keys",
  21. .id = -1,
  22. .dev = {
  23. .platform_data = &gpio_key_info,
  24. },
  25. };
  26.  
  27. .
  28. .
  29. .
  30. static struct platform_device *devices[] __initdata = {
  31. &lpc313x_mci_device,
  32. &keys_gpio, //Daten an Treiber übergeben
  33. #if defined (CONFIG_MTD_NAND_LPC313X)
  34. &lpc313x_nand_device,
  35. #endif
  36. #if defined(CONFIG_SPI_LPC313X)
  37. &lpc313x_spi_device,
  38. #endif
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement