Linux Audio

Check our new training course

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