leds-netxbig.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * arch/arm/mach-kirkwood/include/mach/leds-netxbig.h
  3. *
  4. * Platform data structure for netxbig LED driver
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __MACH_LEDS_NETXBIG_H
  11. #define __MACH_LEDS_NETXBIG_H
  12. struct netxbig_gpio_ext {
  13. unsigned *addr;
  14. int num_addr;
  15. unsigned *data;
  16. int num_data;
  17. unsigned enable;
  18. };
  19. enum netxbig_led_mode {
  20. NETXBIG_LED_OFF,
  21. NETXBIG_LED_ON,
  22. NETXBIG_LED_SATA,
  23. NETXBIG_LED_TIMER1,
  24. NETXBIG_LED_TIMER2,
  25. NETXBIG_LED_MODE_NUM,
  26. };
  27. #define NETXBIG_LED_INVALID_MODE NETXBIG_LED_MODE_NUM
  28. struct netxbig_led_timer {
  29. unsigned long delay_on;
  30. unsigned long delay_off;
  31. enum netxbig_led_mode mode;
  32. };
  33. struct netxbig_led {
  34. const char *name;
  35. const char *default_trigger;
  36. int mode_addr;
  37. int *mode_val;
  38. int bright_addr;
  39. };
  40. struct netxbig_led_platform_data {
  41. struct netxbig_gpio_ext *gpio_ext;
  42. struct netxbig_led_timer *timer;
  43. int num_timer;
  44. struct netxbig_led *leds;
  45. int num_leds;
  46. };
  47. #endif /* __MACH_LEDS_NETXBIG_H */