Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef B43legacy_LEDS_H_
0003 #define B43legacy_LEDS_H_
0004 
0005 struct b43legacy_wldev;
0006 
0007 #ifdef CONFIG_B43LEGACY_LEDS
0008 
0009 #include <linux/types.h>
0010 #include <linux/leds.h>
0011 
0012 
0013 #define B43legacy_LED_MAX_NAME_LEN  31
0014 
0015 struct b43legacy_led {
0016     struct b43legacy_wldev *dev;
0017     /* The LED class device */
0018     struct led_classdev led_dev;
0019     /* The index number of the LED. */
0020     u8 index;
0021     /* If activelow is true, the LED is ON if the
0022      * bit is switched off. */
0023     bool activelow;
0024     /* The unique name string for this LED device. */
0025     char name[B43legacy_LED_MAX_NAME_LEN + 1];
0026 };
0027 
0028 #define B43legacy_LED_BEHAVIOUR     0x7F
0029 #define B43legacy_LED_ACTIVELOW     0x80
0030 /* LED behaviour values */
0031 enum b43legacy_led_behaviour {
0032     B43legacy_LED_OFF,
0033     B43legacy_LED_ON,
0034     B43legacy_LED_ACTIVITY,
0035     B43legacy_LED_RADIO_ALL,
0036     B43legacy_LED_RADIO_A,
0037     B43legacy_LED_RADIO_B,
0038     B43legacy_LED_MODE_BG,
0039     B43legacy_LED_TRANSFER,
0040     B43legacy_LED_APTRANSFER,
0041     B43legacy_LED_WEIRD,
0042     B43legacy_LED_ASSOC,
0043     B43legacy_LED_INACTIVE,
0044 };
0045 
0046 void b43legacy_leds_init(struct b43legacy_wldev *dev);
0047 void b43legacy_leds_exit(struct b43legacy_wldev *dev);
0048 
0049 #else /* CONFIG_B43LEGACY_LEDS */
0050 /* LED support disabled */
0051 
0052 struct b43legacy_led {
0053     /* empty */
0054 };
0055 
0056 static inline void b43legacy_leds_init(struct b43legacy_wldev *dev)
0057 {
0058 }
0059 static inline void b43legacy_leds_exit(struct b43legacy_wldev *dev)
0060 {
0061 }
0062 #endif /* CONFIG_B43LEGACY_LEDS */
0063 
0064 #endif /* B43legacy_LEDS_H_ */