leds.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef B43legacy_LEDS_H_
  2. #define B43legacy_LEDS_H_
  3. struct b43legacy_wldev;
  4. #ifdef CONFIG_B43LEGACY_LEDS
  5. #include <linux/types.h>
  6. #include <linux/leds.h>
  7. #define B43legacy_LED_MAX_NAME_LEN 31
  8. struct b43legacy_led {
  9. struct b43legacy_wldev *dev;
  10. /* The LED class device */
  11. struct led_classdev led_dev;
  12. /* The index number of the LED. */
  13. u8 index;
  14. /* If activelow is true, the LED is ON if the
  15. * bit is switched off. */
  16. bool activelow;
  17. /* The unique name string for this LED device. */
  18. char name[B43legacy_LED_MAX_NAME_LEN + 1];
  19. };
  20. #define B43legacy_LED_BEHAVIOUR 0x7F
  21. #define B43legacy_LED_ACTIVELOW 0x80
  22. /* LED behaviour values */
  23. enum b43legacy_led_behaviour {
  24. B43legacy_LED_OFF,
  25. B43legacy_LED_ON,
  26. B43legacy_LED_ACTIVITY,
  27. B43legacy_LED_RADIO_ALL,
  28. B43legacy_LED_RADIO_A,
  29. B43legacy_LED_RADIO_B,
  30. B43legacy_LED_MODE_BG,
  31. B43legacy_LED_TRANSFER,
  32. B43legacy_LED_APTRANSFER,
  33. B43legacy_LED_WEIRD,
  34. B43legacy_LED_ASSOC,
  35. B43legacy_LED_INACTIVE,
  36. };
  37. void b43legacy_leds_init(struct b43legacy_wldev *dev);
  38. void b43legacy_leds_exit(struct b43legacy_wldev *dev);
  39. #else /* CONFIG_B43LEGACY_LEDS */
  40. /* LED support disabled */
  41. struct b43legacy_led {
  42. /* empty */
  43. };
  44. static inline void b43legacy_leds_init(struct b43legacy_wldev *dev)
  45. {
  46. }
  47. static inline void b43legacy_leds_exit(struct b43legacy_wldev *dev)
  48. {
  49. }
  50. #endif /* CONFIG_B43LEGACY_LEDS */
  51. #endif /* B43legacy_LEDS_H_ */