Home
last modified time | relevance | path

Searched full:leds (Results 1 – 25 of 1540) sorted by relevance

12345678910>>...62

/linux/drivers/leds/blink/
H A Dleds-bcm63138.c9 #include <linux/leds.h>
59 struct bcm63138_leds *leds; member
69 static void bcm63138_leds_write(struct bcm63138_leds *leds, unsigned int reg, in bcm63138_leds_write() argument
72 writel(data, leds->base + reg); in bcm63138_leds_write()
75 static unsigned long bcm63138_leds_read(struct bcm63138_leds *leds, in bcm63138_leds_read() argument
78 return readl(leds->base + reg); in bcm63138_leds_read()
81 static void bcm63138_leds_update_bits(struct bcm63138_leds *leds, in bcm63138_leds_update_bits() argument
86 bcm63138_leds_write(leds, reg, (bcm63138_leds_read(leds, reg) & ~mask) | (val & mask)); in bcm63138_leds_update_bits()
93 static void bcm63138_leds_set_flash_rate(struct bcm63138_leds *leds, in bcm63138_leds_set_flash_rate() argument
100 bcm63138_leds_update_bits(leds, BCM63138_FLASH_RATE_CTRL1 + reg_offset, in bcm63138_leds_set_flash_rate()
[all …]
/linux/drivers/leds/
H A Dleds-mc13783.c3 * LEDs driver for Freescale MC13783/MC13892/MC34708
7 * Based on leds-da903x:
19 #include <linux/leds.h>
33 struct mc13xxx_leds *leds; member
58 struct mc13xxx_leds *leds = led->leds; in mc13xxx_led_set() local
106 return mc13xxx_reg_rmw(leds->master, leds->devtype->ledctrl_base + reg, in mc13xxx_led_set()
115 struct mc13xxx_leds *leds = platform_get_drvdata(pdev); in mc13xxx_led_probe_dt() local
126 of_get_child_by_name(dev_of_node(dev->parent), "leds"); in mc13xxx_led_probe_dt()
132 leds->devtype->num_regs); in mc13xxx_led_probe_dt()
149 pdata->led[i].id = leds->devtype->led_min + tmp; in mc13xxx_led_probe_dt()
[all …]
H A Dleds-mt6323.c8 #include <linux/leds.h>
108 * @max_period: Maximum period for all LEDs
109 * @max_leds: Maximum number of supported LEDs
111 * @max_brightness: Maximum brightness for all LEDs
156 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_brightness() local
157 const struct mt6323_regs *regs = leds->pdata->regs; in mt6323_led_hw_brightness()
158 struct regmap *regmap = leds->hw->regmap; in mt6323_led_hw_brightness()
181 struct mt6323_leds *leds = led->parent; in mt6323_led_hw_off() local
182 const struct mt6323_regs *regs = leds->pdata->regs; in mt6323_led_hw_off()
183 struct regmap *regmap = leds->hw->regmap; in mt6323_led_hw_off()
[all …]
H A Dleds-sc27xx-bltc.c4 #include <linux/leds.h>
56 struct sc27xx_led leds[SC27XX_LEDS_MAX]; member
82 static u32 sc27xx_led_get_offset(struct sc27xx_led *leds) in sc27xx_led_get_offset() argument
84 return leds->priv->base + SC27XX_LEDS_OFFSET * leds->line; in sc27xx_led_get_offset()
87 static int sc27xx_led_enable(struct sc27xx_led *leds, enum led_brightness value) in sc27xx_led_enable() argument
89 u32 base = sc27xx_led_get_offset(leds); in sc27xx_led_enable()
90 u32 ctrl_base = leds->priv->base + SC27XX_LEDS_CTRL; in sc27xx_led_enable()
91 u8 ctrl_shift = SC27XX_CTRL_SHIFT * leds->line; in sc27xx_led_enable()
92 struct regmap *regmap = leds->priv->regmap; in sc27xx_led_enable()
107 static int sc27xx_led_disable(struct sc27xx_led *leds) in sc27xx_led_disable() argument
[all …]
H A Dleds-ariel.c9 #include <linux/leds.h>
85 struct ariel_led *leds; in ariel_led_probe() local
94 leds = devm_kcalloc(dev, NLEDS, sizeof(*leds), GFP_KERNEL); in ariel_led_probe()
95 if (!leds) in ariel_led_probe()
98 leds[0].ec_index = EC_BLUE_LED; in ariel_led_probe()
99 leds[0].led_cdev.name = "blue:power"; in ariel_led_probe()
100 leds[0].led_cdev.default_trigger = "default-on"; in ariel_led_probe()
102 leds[1].ec_index = EC_AMBER_LED; in ariel_led_probe()
103 leds[1].led_cdev.name = "amber:status"; in ariel_led_probe()
105 leds[2].ec_index = EC_GREEN_LED; in ariel_led_probe()
[all …]
H A Dleds-gpio-register.c7 #include <linux/leds.h>
16 * Makes a copy of pdata and pdata->leds and registers a new leds-gpio device
17 * with the result. This allows to have pdata and pdata-leds in .init.rodata
32 _pdata.leds = kmemdup(pdata->leds, in gpio_led_register_device()
33 pdata->num_leds * sizeof(*pdata->leds), GFP_KERNEL); in gpio_led_register_device()
34 if (!_pdata.leds) in gpio_led_register_device()
37 ret = platform_device_register_resndata(NULL, "leds-gpio", id, in gpio_led_register_device()
40 kfree(_pdata.leds); in gpio_led_register_device()
H A Dleds-ot200.c2 * Bachmann ot200 leds driver.
13 #include <linux/leds.h>
26 * The device has three leds on the back panel (led_err, led_init and led_run)
27 * and can handle up to seven leds on the front panel.
30 static struct ot200_led leds[] = { variable
122 for (i = 0; i < ARRAY_SIZE(leds); i++) { in ot200_led_probe()
124 leds[i].cdev.name = leds[i].name; in ot200_led_probe()
125 leds[i].cdev.brightness_set = ot200_led_brightness_set; in ot200_led_probe()
127 ret = devm_led_classdev_register(&pdev->dev, &leds[i].cdev); in ot200_led_probe()
132 leds_front = 0; /* turn off all front leds */ in ot200_led_probe()
[all …]
H A DTODO3 * On/off LEDs should have max_brightness of 1
18 No two LEDs have same name, so the names are probably unusable for the
23 LEDs not on the list?
32 * Figure out what to do with RGB leds
35 Green-Magenta-Ultraviolet LED, but so far all the LEDs we support are
42 color", which not all multicolor LEDs can.
44 Proposal: let's add "rgb" to led_colors in drivers/leds/led-core.c,
46 multicolor for RGB LEDs.
50 RGB LEDs are quite common, and it would be good to be able to turn LED
55 * Command line utility to manipulate the LEDs?
[all …]
/linux/drivers/net/wireless/ath/ath10k/
H A Dleds.c9 #include <linux/leds.h>
15 #include "leds.h"
21 leds.cdev); in ath10k_leds_set_brightness_blocking()
22 struct gpio_led *led = &ar->leds.wifi_led; in ath10k_leds_set_brightness_blocking()
29 ar->leds.gpio_state_pin = (brightness != LED_OFF) ^ led->active_low; in ath10k_leds_set_brightness_blocking()
30 ath10k_wmi_gpio_output(ar, led->gpio, ar->leds.gpio_state_pin); in ath10k_leds_set_brightness_blocking()
41 /* leds not supported */ in ath10k_leds_start()
61 /* leds not supported */ in ath10k_leds_register()
64 snprintf(ar->leds.label, sizeof(ar->leds.label), "ath10k-%s", in ath10k_leds_register()
66 ar->leds.wifi_led.active_low = 1; in ath10k_leds_register()
[all …]
/linux/drivers/net/wireless/broadcom/b43/
H A Dleds.c17 #include "leds.h"
77 struct b43_leds *leds = container_of(work, struct b43_leds, work); in b43_leds_work() local
78 struct b43_wl *wl = container_of(leds, struct b43_wl, leds); in b43_leds_work()
86 b43_led_update(dev, &wl->leds.led_tx); in b43_leds_work()
87 b43_led_update(dev, &wl->leds.led_rx); in b43_leds_work()
88 b43_led_update(dev, &wl->leds.led_radio); in b43_leds_work()
89 b43_led_update(dev, &wl->leds.led_assoc); in b43_leds_work()
102 if (likely(!wl->leds.stop)) { in b43_led_brightness_set()
104 ieee80211_queue_work(wl->hw, &wl->leds.work); in b43_led_brightness_set()
130 b43warn(dev->wl, "LEDs: Failed to register %s\n", name); in b43_register_led()
[all …]
/linux/drivers/input/
H A Dinput-leds.c12 #include <linux/leds.h>
53 struct input_led leds[] __counted_by(num_leds);
93 struct input_leds *leds; in input_leds_connect() local
104 leds = kzalloc(struct_size(leds, leds, num_leds), GFP_KERNEL); in input_leds_connect()
105 if (!leds) in input_leds_connect()
108 leds->num_leds = num_leds; in input_leds_connect()
110 leds->handle.dev = dev; in input_leds_connect()
111 leds->handle.handler = handler; in input_leds_connect()
112 leds->handle.name = "leds"; in input_leds_connect()
113 leds->handle.private = leds; in input_leds_connect()
[all …]
/linux/Documentation/devicetree/bindings/leds/
H A Dleds-bcm63138.yaml4 $id: http://devicetree.org/schemas/leds/leds-bcm63138.yaml#
7 title: Broadcom's BCM63138 LEDs controller
13 This LEDs controller was first used on BCM63138 and later reused on BCM4908,
16 It supports up to 32 LEDs that can be connected parallelly or serially. It
19 Binding serially connected LEDs isn't documented yet.
26 - brcm,bcm4908-leds
27 - brcm,bcm6848-leds
28 - brcm,bcm6858-leds
29 - brcm,bcm63148-leds
30 - brcm,bcm63381-leds
[all …]
H A Dleds-bcm6328.yaml4 $id: http://devicetree.org/schemas/leds/leds-bcm6328.yaml#
7 title: LEDs connected to Broadcom BCM6328 controller
14 In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
15 However, on some devices there are Serial LEDs (LEDs connected to a 74x164
20 Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
21 exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
28 registers you have some limited control over rerouting the LEDs (as
32 reason, hardware controlled LEDs aren't registered as LED class devices.
34 Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
38 const: brcm,bcm6328-leds
[all …]
H A Dleds-group-multicolor.yaml4 $id: http://devicetree.org/schemas/leds/leds-group-multicolor.yaml#
7 title: Multi-color LED built with monochromatic LEDs
13 This driver combines several monochromatic LEDs into one multi-color
18 const: leds-group-multicolor
20 leds:
22 An aray of monochromatic leds
26 - leds
29 - $ref: leds-class-multicolor.yaml#
36 #include <dt-bindings/leds/common.h>
38 monochromatic-leds {
[all …]
/linux/drivers/leds/trigger/
H A DKconfig6 This option enables trigger support for the leds class.
7 These triggers allow kernel events to drive the LEDs and can
15 This allows LEDs to be controlled by a programmable timer
18 For more details read Documentation/leds/leds-class.rst.
25 This allows LEDs to blink in one-shot pulses with parameters
39 This allows LEDs to be controlled by disk activity.
46 This allows LEDs to be controlled by MTD activity.
52 This allows LEDs to be controlled by a CPU load average.
60 This allows LEDs to be controlled as a backlight device: they
69 This allows LEDs to be controlled by active CPUs. This shows
[all …]
/linux/Documentation/ABI/testing/
H A Dsysfs-driver-hid-srws11 What: /sys/class/leds/SRWS1::<serial>::RPM1
2 What: /sys/class/leds/SRWS1::<serial>::RPM2
3 What: /sys/class/leds/SRWS1::<serial>::RPM3
4 What: /sys/class/leds/SRWS1::<serial>::RPM4
5 What: /sys/class/leds/SRWS1::<serial>::RPM5
6 What: /sys/class/leds/SRWS1::<serial>::RPM6
7 What: /sys/class/leds/SRWS1::<serial>::RPM7
8 What: /sys/class/leds/SRWS1::<serial>::RPM8
9 What: /sys/class/leds/SRWS1::<serial>::RPM9
10 What: /sys/class/leds/SRWS1::<serial>::RPM10
[all …]
H A Dsysfs-class-led-trigger-netdev1 What: /sys/class/leds/<led>/device_name
4 Contact: linux-leds@vger.kernel.org
8 What: /sys/class/leds/<led>/interval
11 Contact: linux-leds@vger.kernel.org
21 What: /sys/class/leds/<led>/link
24 Contact: linux-leds@vger.kernel.org
35 What: /sys/class/leds/<led>/tx
38 Contact: linux-leds@vger.kernel.org
50 What: /sys/class/leds/<led>/rx
53 Contact: linux-leds@vger.kernel.org
[all …]
/linux/drivers/net/wireless/ath/carl9170/
H A Dled.c52 /* disable LEDs */ in carl9170_led_init()
78 if (ar->leds[i].registered) { in carl9170_led_update()
79 if (ar->leds[i].last_state || in carl9170_led_update()
80 ar->leds[i].toggled) { in carl9170_led_update()
82 if (ar->leds[i].toggled) in carl9170_led_update()
83 tmp = 70 + 200 / (ar->leds[i].toggled); in carl9170_led_update()
89 ar->leds[i].toggled = 0; in carl9170_led_update()
129 snprintf(ar->leds[i].name, sizeof(ar->leds[i].name), in carl9170_led_register_led()
132 ar->leds[i].ar = ar; in carl9170_led_register_led()
133 ar->leds[i].l.name = ar->leds[i].name; in carl9170_led_register_led()
[all …]
/linux/Documentation/leds/
H A Dleds-lm3556.rst26 LM3556 Flash can be controlled through /sys/class/leds/flash/brightness file
35 #echo 0 > /sys/class/leds/flash/brightness
39 #echo 1 > /sys/class/leds/flash/brightness
45 #echo 16 > /sys/class/leds/flash/brightness
54 LM3556 torch can be controlled through /sys/class/leds/torch/brightness file.
62 #echo 0 > /sys/class/leds/torch/brightness
66 #echo 1 > /sys/class/leds/torch/brightness
72 #echo 8 > /sys/class/leds/torch/brightness
77 Indicator pattern can be set through /sys/class/leds/indicator/pattern file,
90 #echo 0 > /sys/class/leds/indicator/pattern
[all …]
H A Dwell-known-leds.txt5 directories in /sys/class/leds. It would be nice if userland would
17 Notice there's a list of functions in include/dt-bindings/leds/common.h .
21 Game controllers may feature LEDs to indicate a player number. This is commonly
23 The "player LEDs" are then programmed with a pattern to indicate a particular
24 player. For example, a game controller with 4 LEDs, may be programmed with "x---"
26 Input drivers can utilize the LED class to expose the individual player LEDs
40 Set of common keyboard LEDs, going back to PC AT or so.
57 LEDs on notebook body, indicating that sound input / output is muted.
69 Good: "platform:*:charging" (allwinner sun50i, leds-cht-wcove)
83 * Ethernet LEDs
[all …]
H A Dleds-class.rst5 In its simplest form, the LED class just allows control of LEDs from
6 userspace. LEDs appear in /sys/class/leds/. The maximum brightness of the
8 of the LED (taking a value 0-max_brightness). Most LEDs don't have hardware
18 Complex triggers while available to all LEDs have LED specific
22 be specified via /sys/class/leds/<device>/delay_{on,off} in milliseconds.
28 is chosen (via /sys/class/leds/<device>/trigger). Trigger specific
29 parameters can appear in /sys/class/leds/<device> once a given trigger is
36 The underlying design philosophy is simplicity. LEDs are simple devices
53 retrieved using get_led_device_info.sh script from tools/leds; generally
54 this section is expected mostly for LEDs that are somehow associated with
[all …]
/linux/drivers/leds/rgb/
H A DKconfig6 tristate "LEDs group multi-color support"
9 This option enables support for monochrome LEDs that are grouped
10 into multicolor LEDs which is useful in the case where LEDs of
15 will be called leds-group-multicolor.
27 will be called leds-ktd202x.
38 will be called leds-ncp5623.
44 This option enables support for PWM driven monochrome LEDs that are
45 grouped into multicolor LEDs.
48 will be called leds-pwm-multicolor.
60 sink, intended to drive RGB LEDs. Each channel can either be used as
[all …]
/linux/drivers/net/wireless/intersil/p54/
H A Dled.c21 #include <linux/leds.h>
38 for (i = 0; i < ARRAY_SIZE(priv->leds); i++) in p54_update_leds()
39 if (priv->leds[i].toggled) { in p54_update_leds()
42 tmp = 70 + 200 / (priv->leds[i].toggled); in p54_update_leds()
46 if (priv->leds[i].led_dev.brightness == LED_OFF) in p54_update_leds()
49 priv->leds[i].toggled = in p54_update_leds()
50 !!priv->leds[i].led_dev.brightness; in p54_update_leds()
57 "failed to update LEDs (%d).\n", err); in p54_update_leds()
85 struct p54_led_dev *led = &priv->leds[led_index]; in p54_register_led()
116 * of available/programmable LEDs of the device. in p54_init_leds()
[all …]
/linux/Documentation/firmware-guide/acpi/dsd/
H A Dleds.rst5 Describing and referring to LEDs in ACPI
8 Individual LEDs are described by hierarchical data extension [5] nodes under the
10 tells the numerical ID of each individual LED output to which the LEDs are
11 connected. [leds] The hierarchical data nodes are named "led@X", where X is the
14 Referring to LEDs in Device tree is documented in [video-interfaces], in
15 "flash-leds" property documentation. In short, LEDs are directly referred to by
21 individual LEDs. The value of the "reg" property is a contract between the
32 An ASL example of a camera sensor device and a LED driver device for two LEDs is
33 show below. Objects not relevant for LEDs or the references to them have been
71 "flash-leds",
[all …]
/linux/drivers/net/ethernet/realtek/
H A Dr8169_leds.c9 #include <linux/leds.h>
154 struct r8169_led_classdev *leds; in rtl8168_init_leds() local
157 leds = kcalloc(RTL8168_NUM_LEDS + 1, sizeof(*leds), GFP_KERNEL); in rtl8168_init_leds()
158 if (!leds) in rtl8168_init_leds()
162 rtl8168_setup_ldev(leds + i, ndev, i); in rtl8168_init_leds()
164 return leds; in rtl8168_init_leds()
253 struct r8169_led_classdev *leds; in rtl8125_init_leds() local
256 leds = kcalloc(RTL8125_NUM_LEDS + 1, sizeof(*leds), GFP_KERNEL); in rtl8125_init_leds()
257 if (!leds) in rtl8125_init_leds()
261 rtl8125_setup_led_ldev(leds + i, ndev, i); in rtl8125_init_leds()
[all …]

12345678910>>...62