Home
last modified time | relevance | path

Searched +full:led +full:- (Results 1 – 25 of 1097) sorted by relevance

12345678910>>...44

/linux/sound/usb/caiaq/
H A Dcontrol.c1 // SPDX-License-Identifier: GPL-2.0-or-later
24 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); in control_info()
25 int pos = kcontrol->private_value; in control_info()
29 uinfo->count = 1; in control_info()
32 switch (cdev->chip.usb_id) { in control_info()
37 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in control_info()
38 uinfo->value.integer.min = 0; in control_info()
39 uinfo->value.integer.max = 2; in control_info()
54 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; in control_info()
55 uinfo->value.integer.min = 0; in control_info()
[all …]
/linux/drivers/leds/
H A Dleds-bd2802.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * leds-bd2802.c - RGB LED Driver
8 * Datasheet: http://www.rohm.com/products/databook/driver/pdf/bd2802gu-e.pdf
16 #include <linux/leds-bd2802.h>
73 struct led_state led[2]; member
104 /*--------------------------------------------------------------*/
106 /*--------------------------------------------------------------*/
108 static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, in bd2802_is_rgb_off() argument
113 return !led->led[id].r; in bd2802_is_rgb_off()
115 return !led->led[id].g; in bd2802_is_rgb_off()
[all …]
H A DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
16 bool "LED Support"
18 Say Y to enable Linux LED support. This allows control of supported
24 tristate "LED Class Support"
26 This option enables the LED sysfs class in /sys/class/leds. You'll
30 tristate "LED Flash Class Support"
33 This option enables the flash LED sysfs class in /sys/class/leds.
34 It wraps LED Class and adds flash LEDs specific sysfs attributes
36 for the flash related features of a LED device. It can be built
40 tristate "LED Multicolor Class Support"
[all …]
H A Dleds-lm3692x.c1 // SPDX-License-Identifier: GPL-2.0
2 // TI LM3692x LED chip family driver
3 // Copyright (C) 2017-18 Texas Instruments Incorporated - https://www.ti.com/
101 * @led_dev: LED class device pointer
104 * @regulator: LED supply regulator pointer
105 * @led_enable: LED sync to be enabled
145 static int lm3692x_fault_check(struct lm3692x_led *led) in lm3692x_fault_check() argument
150 ret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
155 dev_err(&led->client->dev, "Detected a fault 0x%X\n", read_buf); in lm3692x_fault_check()
160 regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
[all …]
H A Dleds-cpcap.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 #include <linux/mfd/motorola-cpcap.h>
52 /* camera privacy led */
62 struct led_classdev led; member
81 static int cpcap_led_set_power(struct cpcap_led *led, bool status) in cpcap_led_set_power() argument
85 if (status == led->powered) in cpcap_led_set_power()
89 err = regulator_enable(led->vdd); in cpcap_led_set_power()
91 err = regulator_disable(led->vdd); in cpcap_led_set_power()
94 dev_err(led->dev, "regulator failure: %d", err); in cpcap_led_set_power()
98 led->powered = status; in cpcap_led_set_power()
[all …]
H A Dleds-max8997.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * leds-max8997.c - LED class driver for MAX8997 LEDs.
14 #include <linux/mfd/max8997-private.h>
47 static void max8997_led_set_mode(struct max8997_led *led, in max8997_led_set_mode() argument
51 struct i2c_client *client = led->iodev->i2c; in max8997_led_set_mode()
57 val = led->id ? in max8997_led_set_mode()
59 led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; in max8997_led_set_mode()
63 val = led->id ? in max8997_led_set_mode()
65 led->cdev.max_brightness = MAX8997_LED_MOVIE_MAX_BRIGHTNESS; in max8997_led_set_mode()
70 val = led->id ? in max8997_led_set_mode()
[all …]
H A Dleds-lm3697.c1 // SPDX-License-Identifier: GPL-2.0
2 // TI LM3697 LED chip family driver
3 // Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
15 #include <linux/leds-ti-lmu-common.h>
47 * struct lm3697_led -
48 * @hvled_strings: Array of LED strings associated with a control bank
49 * @label: LED label
50 * @led_dev: LED class device
53 * @control_bank: Control bank the LED is associated to. 0 is control bank A
55 * @enabled: LED brightness level (or LED_OFF)
[all …]
H A Dleds-lm3533.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * leds-lm3533.c -- LM3533 LED driver
5 * Copyright (C) 2011-2012 Texas Instruments
59 static inline int lm3533_led_get_ctrlbank_id(struct lm3533_led *led) in lm3533_led_get_ctrlbank_id() argument
61 return led->id + 2; in lm3533_led_get_ctrlbank_id()
64 static inline u8 lm3533_led_get_lv_reg(struct lm3533_led *led, u8 base) in lm3533_led_get_lv_reg() argument
66 return base + led->id; in lm3533_led_get_lv_reg()
69 static inline u8 lm3533_led_get_pattern(struct lm3533_led *led) in lm3533_led_get_pattern() argument
71 return led->id; in lm3533_led_get_pattern()
74 static inline u8 lm3533_led_get_pattern_reg(struct lm3533_led *led, in lm3533_led_get_pattern_reg() argument
[all …]
H A Dleds-bcm6328.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for BCM6328 memory-mapped LEDs, based on leds-syscon.c
59 * struct bcm6328_led - state container for bcm6328 based LEDs
60 * @cdev: LED class device for this LED
63 * @pin: LED pin number
66 * @active_low: LED is active low
98 * bits [31:0] -> LEDs 8-23
99 * bits [47:32] -> LEDs 0-7
100 * bits [63:48] -> unused
105 return pin + 16; /* LEDs 0-7 (bits 47:32) */ in bcm6328_pin2shift()
[all …]
H A Dleds-regulator.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * leds-regulator.c - LED class driver for regulator driven LEDs.
7 * Inspired by leds-wm8350 driver.
15 #include <linux/leds-regulator.h>
40 * and the LED can be turned on and off. in led_regulator_get_max_brightness()
53 return -EINVAL; in led_regulator_get_voltage()
55 return regulator_list_voltage(supply, brightness - 1); in led_regulator_get_voltage()
59 static void regulator_led_enable(struct regulator_led *led) in regulator_led_enable() argument
63 if (led->enabled) in regulator_led_enable()
66 ret = regulator_enable(led->vcc); in regulator_led_enable()
[all …]
H A Dleds-pm8058.c1 // SPDX-License-Identifier: GPL-2.0-only
30 struct pm8058_led *led; in pm8058_led_set() local
35 led = container_of(cled, struct pm8058_led, cdev); in pm8058_led_set()
36 switch (led->ledtype) { in pm8058_led_set()
50 ret = regmap_update_bits(led->map, led->reg, mask, val); in pm8058_led_set()
52 pr_err("Failed to set LED brightness\n"); in pm8058_led_set()
57 struct pm8058_led *led; in pm8058_led_get() local
61 led = container_of(cled, struct pm8058_led, cdev); in pm8058_led_get()
63 ret = regmap_read(led->map, led->reg, &val); in pm8058_led_get()
65 pr_err("Failed to get LED brightness\n"); in pm8058_led_get()
[all …]
H A Dleds-cht-wcove.c1 // SPDX-License-Identifier: GPL-2.0
30 #define CHT_WC_LED1_SWCTL BIT(0) /* HW or SW control of charging led */
34 #define CHT_WC_LED_I_MA2_5 (2 << 2) /* LED current limit */
35 #define CHT_WC_LED_I_MASK GENMASK(3, 2) /* LED current limit mask */
56 /* Mask + values for turning the LED on/off */
109 struct cht_wc_led *led = container_of(cdev, struct cht_wc_led, cdev); in cht_wc_leds_brightness_set() local
112 mutex_lock(&led->mutex); in cht_wc_leds_brightness_set()
115 ret = regmap_update_bits(led->regmap, led->regs->ctrl, in cht_wc_leds_brightness_set()
116 led->regs->on_off_mask, led->regs->off_val); in cht_wc_leds_brightness_set()
118 dev_err(cdev->dev, "Failed to turn off: %d\n", ret); in cht_wc_leds_brightness_set()
[all …]
H A Dleds-turris-omnia.c1 // SPDX-License-Identifier: GPL-2.0
9 #include <linux/led-class-multicolor.h>
13 #include <linux/turris-omnia-mcu-interface.h>
22 * struct omnia_led - per-LED part of driver private data structure
23 * @mc_cdev: multi-color LED class device
24 * @subled_info: per-channel information
25 * @cached_channels: cached values of per-channel brightness that was sent to the MCU
26 * @on: whether the LED was set on
27 * @hwtrig: whether the LED blinking was offloaded to the MCU
28 * @reg: LED identifier to the MCU
[all …]
/linux/drivers/leds/flash/
H A Dleds-lm3601x.c1 // SPDX-License-Identifier: GPL-2.0
2 // Flash and torch driver for Texas Instruments LM3601X LED
4 // Copyright (C) 2018 Texas Instruments Incorporated - https://www.ti.com/
9 #include <linux/led-class-flash.h>
73 * struct lm3601x_led - private lm3601x LED data
74 * @fled_cdev: flash LED class device pointer
134 static int lm3601x_read_faults(struct lm3601x_led *led) in lm3601x_read_faults() argument
139 ret = regmap_read(led->regmap, LM3601X_FLAGS_REG, &flags_val); in lm3601x_read_faults()
141 return -EIO; in lm3601x_read_faults()
143 led->last_flag = 0; in lm3601x_read_faults()
[all …]
H A Dleds-aat1290.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED Flash class driver for the AAT1290
4 * 1.5A Step-Up Current Regulator for Flash LEDs
13 #include <linux/led-class-flash.h>
21 #include <media/v4l2-flash-led-class.h>
50 /* maximum LED current in movie mode */
52 /* maximum LED current in flash mode */
58 /* max LED brightness level */
68 /* corresponding LED Flash class device */
95 static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) in aat1290_as2cwire_write() argument
[all …]
H A Dleds-ktd2692.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED driver : leds-ktd2692.c
12 #include <linux/leds-expresswire.h>
13 #include <linux/led-class-flash.h>
52 /* maximum LED current in movie mode */
54 /* maximum LED current in flash mode */
58 /* max LED brightness level */
75 /* Related LED Flash class device */
98 struct ktd2692_context *led = fled_cdev_to_led(fled_cdev); in ktd2692_led_brightness_set() local
100 mutex_lock(&led->lock); in ktd2692_led_brightness_set()
[all …]
H A Dleds-mt6360.c1 // SPDX-License-Identifier: GPL-2.0-only
8 #include <linux/led-class-flash.h>
9 #include <linux/led-class-multicolor.h>
15 #include <media/v4l2-flash-led-class.h>
29 #define MT6360_ISNK_ENMASK(_led_no) BIT(7 - (_led_no))
39 #define MT6360_REG_FLEDBASE(_id) (0x372 + 4 * (_id - MT6360_LED_FLASH1))
49 #define MT6360_FLCSEN_MASK(_id) BIT(MT6360_LED_FLASH2 - _id)
101 struct mt6360_led *led = container_of(mccdev, struct mt6360_led, mc); in mt6360_mc_brightness_set() local
102 struct mt6360_priv *priv = led->priv; in mt6360_mc_brightness_set()
106 mutex_lock(&priv->lock); in mt6360_mc_brightness_set()
[all …]
H A Dleds-qcom-flash.c1 // SPDX-License-Identifier: GPL-2.0-only
9 #include <linux/led-class-flash.h>
14 #include <media/v4l2-flash-led-class.h>
175 static int set_flash_module_en(struct qcom_flash_led *led, bool en) in set_flash_module_en() argument
177 struct qcom_flash_data *flash_data = led->flash_data; in set_flash_module_en()
181 for (i = 0; i < led->chan_count; i++) in set_flash_module_en()
182 led_mask |= BIT(led->chan_id[i]); in set_flash_module_en()
184 mutex_lock(&flash_data->lock); in set_flash_module_en()
186 flash_data->chan_en_bits |= led_mask; in set_flash_module_en()
188 flash_data->chan_en_bits &= ~led_mask; in set_flash_module_en()
[all …]
/linux/Documentation/devicetree/bindings/leds/
H A Dcommon.yaml1 # SPDX-License-Identifier: GPL-2.0-only
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Jacek Anaszewski <jacek.anaszewski@gmail.com>
11 - Pavel Machek <pavel@ucw.cz>
14 LED and flash LED devices provide the same basic functionality as current
15 regulators, but extended with LED and flash LED specific features like
18 Many LED devices expose more than one current output that can be connected
19 to one or more discrete LED component. Since the arrangement of connections
20 can influence the way of the LED device initialization, the LED components
[all …]
H A Dleds-mt6360.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/leds/leds-mt6360.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: LED driver for MT6360 PMIC from MediaTek Integrated.
10 - Gene Chen <gene_chen@richtek.com>
15 Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode,
16 and 4-channel RGB LED support Register/Flash/Breath Mode
20 const: mediatek,mt6360-led
22 "#address-cells":
[all …]
H A Dleds-lp55xx.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/leds/leds-lp55xx.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: TI/National Semiconductor LP55xx and LP8501 LED Drivers
10 - Jacek Anaszewski <jacek.anaszewski@gmail.com>
11 - Pavel Machek <pavel@ucw.cz>
15 LED Drivers.
27 - national,lp5521
28 - national,lp5523
[all …]
/linux/drivers/net/wireless/broadcom/b43/
H A Dleds.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 LED control
7 Copyright (c) 2005 Martin Langer <martin-langer@gmx.de>,
9 Copyright (c) 2005-2007 Michael Buesch <m@bues.ch>
48 struct b43_led *led) in b43_led_update() argument
53 if (!led->wl) in b43_led_update()
56 radio_enabled = (dev->phy.radio_on && dev->radio_hw_enable); in b43_led_update()
58 /* The led->state read is racy, but we don't care. In case we raced in b43_led_update()
62 turn_on = atomic_read(&led->state) != LED_OFF; in b43_led_update()
65 if (turn_on == led->hw_state) in b43_led_update()
[all …]
/linux/drivers/hid/
H A Dhid-gt683r.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MSI GT683R led driver
14 #include "hid-ids.h"
63 struct device *dev = led_cdev->dev->parent; in gt683r_brightness_set()
65 struct gt683r_led *led = hid_get_drvdata(hdev); in gt683r_brightness_set() local
68 if (led_cdev == &led->led_devs[i]) in gt683r_brightness_set()
73 led->brightnesses[i] = brightness; in gt683r_brightness_set()
74 schedule_work(&led->work); in gt683r_brightness_set()
83 struct hid_device *hdev = to_hid_device(dev->parent); in mode_show()
84 struct gt683r_led *led = hid_get_drvdata(hdev); in mode_show() local
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_led.c37 nouveau_led_get_brightness(struct led_classdev *led) in nouveau_led_get_brightness() argument
39 struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; in nouveau_led_get_brightness()
41 struct nvif_object *device = &drm->client.device.object; in nouveau_led_get_brightness()
54 nouveau_led_set_brightness(struct led_classdev *led, enum led_brightness value) in nouveau_led_set_brightness() argument
56 struct drm_device *drm_dev = container_of(led, struct nouveau_led, led)->dev; in nouveau_led_set_brightness()
58 struct nvif_object *device = &drm->client.device.object; in nouveau_led_set_brightness()
61 u32 freq = 100; /* this is what nvidia uses and it should be good-enough */ in nouveau_led_set_brightness()
68 * - A: nvidia never puts the logo led to any other PWM controler in nouveau_led_set_brightness()
70 * - B: nouveau does not touch these registers anywhere else in nouveau_led_set_brightness()
88 /* check that there is a GPIO controlling the logo LED */ in nouveau_led_init()
[all …]
/linux/drivers/net/dsa/mv88e6xxx/
H A Dleds.c1 // SPDX-License-Identifier: GPL-2.0-or-later
10 /* Offset 0x16: LED control */
34 static int mv88e6xxx_led_brightness_set(struct mv88e6xxx_port *p, int led, in mv88e6xxx_led_brightness_set() argument
40 err = mv88e6xxx_port_led_read(p->chip, p->port, in mv88e6xxx_led_brightness_set()
46 if (led == 1) in mv88e6xxx_led_brightness_set()
52 /* Selector 0x0f == Force LED ON */ in mv88e6xxx_led_brightness_set()
53 if (led == 1) in mv88e6xxx_led_brightness_set()
58 /* Selector 0x0e == Force LED OFF */ in mv88e6xxx_led_brightness_set()
59 if (led == 1) in mv88e6xxx_led_brightness_set()
67 return mv88e6xxx_port_led_write(p->chip, p->port, reg); in mv88e6xxx_led_brightness_set()
[all …]

12345678910>>...44