]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/net/wireless/broadcom/b43legacy/leds.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / drivers / net / wireless / broadcom / b43legacy / leds.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
75388acd
LF
2#ifndef B43legacy_LEDS_H_
3#define B43legacy_LEDS_H_
4
ba48f7bb
LF
5struct b43legacy_wldev;
6
7#ifdef CONFIG_B43LEGACY_LEDS
8
75388acd 9#include <linux/types.h>
ba48f7bb 10#include <linux/leds.h>
75388acd
LF
11
12
ba48f7bb
LF
13#define B43legacy_LED_MAX_NAME_LEN 31
14
75388acd 15struct b43legacy_led {
75388acd 16 struct b43legacy_wldev *dev;
ba48f7bb
LF
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];
75388acd
LF
26};
27
75388acd
LF
28#define B43legacy_LED_BEHAVIOUR 0x7F
29#define B43legacy_LED_ACTIVELOW 0x80
ba48f7bb
LF
30/* LED behaviour values */
31enum b43legacy_led_behaviour {
75388acd
LF
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,
75388acd
LF
44};
45
ba48f7bb 46void b43legacy_leds_init(struct b43legacy_wldev *dev);
75388acd 47void b43legacy_leds_exit(struct b43legacy_wldev *dev);
ba48f7bb 48
063b2dff 49#else /* CONFIG_B43LEGACY_LEDS */
ba48f7bb
LF
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 */
75388acd
LF
63
64#endif /* B43legacy_LEDS_H_ */