leds-kirkwood-netxbig.h 1.1 KB

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