Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 1 | #ifndef B43_LEDS_H_ |
| 2 | #define B43_LEDS_H_ |
| 3 | |
Michael Buesch | 21954c3 | 2007-09-27 15:31:40 +0200 | [diff] [blame] | 4 | struct b43_wldev; |
| 5 | |
| 6 | #ifdef CONFIG_B43_LEDS |
| 7 | |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 8 | #include <linux/types.h> |
Michael Buesch | 21954c3 | 2007-09-27 15:31:40 +0200 | [diff] [blame] | 9 | #include <linux/leds.h> |
| 10 | |
| 11 | |
| 12 | #define B43_LED_MAX_NAME_LEN 31 |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 13 | |
| 14 | struct b43_led { |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 15 | struct b43_wldev *dev; |
Michael Buesch | 21954c3 | 2007-09-27 15:31:40 +0200 | [diff] [blame] | 16 | /* The LED class device */ |
| 17 | struct led_classdev led_dev; |
| 18 | /* The index number of the LED. */ |
| 19 | u8 index; |
| 20 | /* If activelow is true, the LED is ON if the |
| 21 | * bit is switched off. */ |
| 22 | bool activelow; |
| 23 | /* The unique name string for this LED device. */ |
| 24 | char name[B43_LED_MAX_NAME_LEN + 1]; |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 25 | }; |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 26 | |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 27 | #define B43_LED_BEHAVIOUR 0x7F |
| 28 | #define B43_LED_ACTIVELOW 0x80 |
Michael Buesch | 21954c3 | 2007-09-27 15:31:40 +0200 | [diff] [blame] | 29 | /* LED behaviour values */ |
| 30 | enum b43_led_behaviour { |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 31 | B43_LED_OFF, |
| 32 | B43_LED_ON, |
| 33 | B43_LED_ACTIVITY, |
| 34 | B43_LED_RADIO_ALL, |
| 35 | B43_LED_RADIO_A, |
| 36 | B43_LED_RADIO_B, |
| 37 | B43_LED_MODE_BG, |
| 38 | B43_LED_TRANSFER, |
| 39 | B43_LED_APTRANSFER, |
| 40 | B43_LED_WEIRD, //FIXME |
| 41 | B43_LED_ASSOC, |
| 42 | B43_LED_INACTIVE, |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 43 | }; |
| 44 | |
Michael Buesch | 21954c3 | 2007-09-27 15:31:40 +0200 | [diff] [blame] | 45 | void b43_leds_init(struct b43_wldev *dev); |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 46 | void b43_leds_exit(struct b43_wldev *dev); |
Michael Buesch | 21954c3 | 2007-09-27 15:31:40 +0200 | [diff] [blame] | 47 | |
| 48 | |
| 49 | #else /* CONFIG_B43_LEDS */ |
| 50 | /* LED support disabled */ |
| 51 | |
| 52 | struct b43_led { |
| 53 | /* empty */ |
| 54 | }; |
| 55 | |
| 56 | static inline void b43_leds_init(struct b43_wldev *dev) |
| 57 | { |
| 58 | } |
| 59 | static inline void b43_leds_exit(struct b43_wldev *dev) |
| 60 | { |
| 61 | } |
| 62 | #endif /* CONFIG_B43_LEDS */ |
Michael Buesch | e4d6b79 | 2007-09-18 15:39:42 -0400 | [diff] [blame] | 63 | |
| 64 | #endif /* B43_LEDS_H_ */ |