1 #ifndef BCM43xx_LEDS_H_
2 #define BCM43xx_LEDS_H_
4 #include <linux/types.h>
5 #include <linux/timer.h>
12 struct bcm43xx_wldev
*dev
;
13 struct timer_list blink_timer
;
14 unsigned long blink_interval
;
16 #define bcm43xx_led_index(led) ((int)((led) - (led)->dev->leds))
18 /* Delay between state changes when blinking in jiffies */
19 #define BCM43xx_LEDBLINK_SLOW (HZ / 1)
20 #define BCM43xx_LEDBLINK_MEDIUM (HZ / 4)
21 #define BCM43xx_LEDBLINK_FAST (HZ / 8)
23 #define BCM43xx_LED_XFER_THRES (HZ / 100)
25 #define BCM43xx_LED_BEHAVIOUR 0x7F
26 #define BCM43xx_LED_ACTIVELOW 0x80
27 enum { /* LED behaviour values */
31 BCM43xx_LED_RADIO_ALL
,
36 BCM43xx_LED_APTRANSFER
,
37 BCM43xx_LED_WEIRD
,//FIXME
41 /* Behaviour values for testing.
42 * With these values it is easier to figure out
43 * the real behaviour of leds, in case the SPROM
44 * is missing information.
46 BCM43xx_LED_TEST_BLINKSLOW
,
47 BCM43xx_LED_TEST_BLINKMEDIUM
,
48 BCM43xx_LED_TEST_BLINKFAST
,
51 int bcm43xx_leds_init(struct bcm43xx_wldev
*dev
);
52 void bcm43xx_leds_exit(struct bcm43xx_wldev
*dev
);
53 void bcm43xx_leds_update(struct bcm43xx_wldev
*dev
, int activity
);
54 void bcm43xx_leds_switch_all(struct bcm43xx_wldev
*dev
, int on
);
56 #endif /* BCM43xx_LEDS_H_ */