1 #ifndef BCM43xx_LEDS_H_
 
   2 #define BCM43xx_LEDS_H_
 
   4 #include <linux/types.h>
 
   5 #include <linux/timer.h>
 
  12         struct bcm43xx_private *bcm;
 
  13         struct timer_list blink_timer;
 
  14         unsigned long blink_interval;
 
  16 #define bcm43xx_led_index(led)  ((int)((led) - (led)->bcm->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,
 
  50         /* Misc values for BCM4303 */
 
  51         BCM43xx_LED_BCM4303_0 = 0x2B,
 
  52         BCM43xx_LED_BCM4303_1 = 0x78,
 
  53         BCM43xx_LED_BCM4303_2 = 0x2E,
 
  54         BCM43xx_LED_BCM4303_3 = 0x19,
 
  57 int bcm43xx_leds_init(struct bcm43xx_private *bcm);
 
  58 void bcm43xx_leds_exit(struct bcm43xx_private *bcm);
 
  59 void bcm43xx_leds_update(struct bcm43xx_private *bcm, int activity);
 
  60 void bcm43xx_leds_switch_all(struct bcm43xx_private *bcm, int on);
 
  62 #endif /* BCM43xx_LEDS_H_ */