Home
last modified time | relevance | path

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

12345678910>>...42

/linux-6.12.1/drivers/leds/
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>
20 #define LED_CTL(rgb2en, rgb1en) ((rgb2en) << 4 | ((rgb1en) << 0))
22 #define BD2802_LED_OFFSET 0xa
23 #define BD2802_COLOR_OFFSET 0x3
25 #define BD2802_REG_CLKSETUP 0x00
26 #define BD2802_REG_CONTROL 0x01
27 #define BD2802_REG_HOURSETUP 0x02
[all …]
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/
17 #define LM36922_MODEL 0
20 #define LM3692X_REV 0x0
21 #define LM3692X_RESET 0x1
22 #define LM3692X_EN 0x10
23 #define LM3692X_BRT_CTRL 0x11
24 #define LM3692X_PWM_CTRL 0x12
25 #define LM3692X_BOOST_CTRL 0x13
[all …]
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>
18 #define MAX8997_LED_FLASH_CUR_MASK 0xf8
20 #define MAX8997_LED_MOVIE_CUR_MASK 0xf0
22 #define MAX8997_LED_FLASH_MAX_BRIGHTNESS 0x1f
23 #define MAX8997_LED_MOVIE_MAX_BRIGHTNESS 0xf
24 #define MAX8997_LED_NONE_MAX_BRIGHTNESS 0
26 #define MAX8997_LED0_FLASH_MASK 0x1
27 #define MAX8997_LED0_FLASH_PIN_MASK 0x5
[all …]
Dleds-cpcap.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 #include <linux/mfd/motorola-cpcap.h>
15 #define CPCAP_LED_NO_CURRENT 0x0001
27 .mask = 0x03FF,
33 .mask = 0x03FF,
39 .mask = 0x03FF,
46 .mask = 0x000F,
48 .init_mask = 0x7FFF,
49 .init_val = 0x5FF0,
52 /* camera privacy led */
[all …]
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>
17 #define LM3697_REV 0x0
18 #define LM3697_RESET 0x1
19 #define LM3697_OUTPUT_CONFIG 0x10
20 #define LM3697_CTRL_A_RAMP 0x11
21 #define LM3697_CTRL_B_RAMP 0x12
22 #define LM3697_CTRL_A_B_RT_RAMP 0x13
[all …]
Dleds-lp8860.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * TI LP8860 4-Channel LED Driver
21 #define LP8860_DISP_CL1_BRT_MSB 0x00
22 #define LP8860_DISP_CL1_BRT_LSB 0x01
23 #define LP8860_DISP_CL1_CURR_MSB 0x02
24 #define LP8860_DISP_CL1_CURR_LSB 0x03
25 #define LP8860_CL2_BRT_MSB 0x04
26 #define LP8860_CL2_BRT_LSB 0x05
27 #define LP8860_CL2_CURRENT 0x06
28 #define LP8860_CL3_BRT_MSB 0x07
[all …]
Dleds-bcm6328.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for BCM6328 memory-mapped LEDs, based on leds-syscon.c
15 #define BCM6328_REG_INIT 0x00
16 #define BCM6328_REG_MODE_HI 0x04
17 #define BCM6328_REG_MODE_LO 0x08
18 #define BCM6328_REG_HWDIS 0x0c
19 #define BCM6328_REG_STROBE 0x10
20 #define BCM6328_REG_LNKACTSEL_HI 0x14
21 #define BCM6328_REG_LNKACTSEL_LO 0x18
22 #define BCM6328_REG_RBACK 0x1c
[all …]
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
27 #define LM3533_REG_CTRLBANK_BCONF_BASE 0x1b
28 #define LM3533_REG_PATTERN_ENABLE 0x28
29 #define LM3533_REG_PATTERN_LOW_TIME_BASE 0x71
30 #define LM3533_REG_PATTERN_HIGH_TIME_BASE 0x72
31 #define LM3533_REG_PATTERN_RISETIME_BASE 0x74
32 #define LM3533_REG_PATTERN_FALLTIME_BASE 0x75
34 #define LM3533_REG_PATTERN_STEP 0x10
[all …]
Dleds-mt6323.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * LED driver for Mediatek MT6323 PMIC
18 * 32K clock common for LED device.
24 #define RG_VWLED_1M_CK_PDN BIT(0)
30 * individual clock for LED device.
41 #define ISINK_CON(r, i) (r + 0x8 * (i))
44 #define ISINK_DIM_DUTY_MASK (0x1f << 8)
48 #define ISINK_DIM_FSEL_MASK (0xffff)
53 #define ISINK_CH_STEP_MASK (0x7 << 12)
55 #define ISINK_SFSTR0_TC_MASK (0x3 << 1)
[all …]
Dleds-wm8350.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED driver for WM8350 driven LEDS.
88 static int wm8350_led_enable(struct wm8350_led *led) in wm8350_led_enable() argument
90 int ret = 0; in wm8350_led_enable()
92 if (led->enabled) in wm8350_led_enable()
95 ret = regulator_enable(led->isink); in wm8350_led_enable()
96 if (ret != 0) { in wm8350_led_enable()
97 dev_err(led->cdev.dev, "Failed to enable ISINK: %d\n", ret); in wm8350_led_enable()
101 ret = regulator_enable(led->dcdc); in wm8350_led_enable()
102 if (ret != 0) { in wm8350_led_enable()
[all …]
Dleds-ns2.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * leds-ns2.c - Driver for the Network Space v2 (and parents) dual-GPIO LED
9 * Based on leds-gpio.c by Raphael Assenat <raph@8d.com>
39 * The Network Space v2 dual-GPIO LED is wired to a CPLD. Three different LED
40 * modes are available: off, on and SATA activity blinking. The LED modes are
42 * for the command/slow GPIOs corresponds to a LED mode.
56 static int ns2_led_get_mode(struct ns2_led *led, enum ns2_led_modes *mode) in ns2_led_get_mode() argument
62 cmd_level = gpiod_get_value_cansleep(led->cmd); in ns2_led_get_mode()
63 slow_level = gpiod_get_value_cansleep(led->slow); in ns2_led_get_mode()
65 for (i = 0; i < led->num_modes; i++) { in ns2_led_get_mode()
[all …]
Dleds-cht-wcove.c1 // SPDX-License-Identifier: GPL-2.0
22 #define CHT_WC_LED1_CTRL 0x5e1f
23 #define CHT_WC_LED1_FSM 0x5e20
24 #define CHT_WC_LED1_PWM 0x5e21
26 #define CHT_WC_LED2_CTRL 0x4fdf
27 #define CHT_WC_LED2_FSM 0x4fe0
28 #define CHT_WC_LED2_PWM 0x4fe1
30 #define CHT_WC_LED1_SWCTL BIT(0) /* HW or SW control of charging led */
33 #define CHT_WC_LED2_ON BIT(0)
34 #define CHT_WC_LED_I_MA2_5 (2 << 2) /* LED current limit */
[all …]
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>
33 int voltage = regulator_list_voltage(supply, 0); in led_regulator_get_max_brightness()
35 if (voltage <= 0) in led_regulator_get_max_brightness()
40 * and the LED can be turned on and off. in led_regulator_get_max_brightness()
43 if (ret < 0) in led_regulator_get_max_brightness()
52 if (brightness == 0) in led_regulator_get_voltage()
53 return -EINVAL; in led_regulator_get_voltage()
[all …]
/linux-6.12.1/sound/usb/caiaq/
Dcontrol.c1 // SPDX-License-Identifier: GPL-2.0-or-later
17 #define CNT_INTVAL 0x10000
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()
35 if (pos == 0) { 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()
[all …]
/linux-6.12.1/drivers/leds/flash/
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>
14 #define LM3601X_LED_IR 0x0
15 #define LM3601X_LED_TORCH 0x1
18 #define LM3601X_ENABLE_REG 0x01
19 #define LM3601X_CFG_REG 0x02
20 #define LM3601X_LED_FLASH_REG 0x03
21 #define LM3601X_LED_TORCH_REG 0x04
[all …]
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 …]
Dleds-max77693.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED Flash class driver for the flash cell of max77693 mfd.
11 #include <linux/led-class-flash.h>
13 #include <linux/mfd/max77693-common.h>
14 #include <linux/mfd/max77693-private.h>
20 #include <media/v4l2-flash-led-class.h>
22 #define MODE_OFF 0
32 #define FLED1_IOUT (1 << 0)
59 /* corresponding LED Flash class device */
80 /* sub led data */
[all …]
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>
27 #define KTD2692_FLASH_MODE_TIMEOUT_DISABLE 0
34 #define KTD2692_REG_LVP_BASE 0x00
35 #define KTD2692_REG_FLASH_TIMEOUT_BASE 0x20
36 #define KTD2692_REG_MM_MIN_CURR_THRESHOLD_BASE 0x40
37 #define KTD2692_REG_MOVIE_CURRENT_BASE 0x60
38 #define KTD2692_REG_FLASH_CURRENT_BASE 0x80
[all …]
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>
17 #define FLASH_REVISION_REG 0x00
18 #define FLASH_4CH_REVISION_V0P1 0x01
20 #define FLASH_TYPE_REG 0x04
21 #define FLASH_TYPE_VAL 0x18
23 #define FLASH_SUBTYPE_REG 0x05
24 #define FLASH_SUBTYPE_3CH_PM8150_VAL 0x04
25 #define FLASH_SUBTYPE_3CH_PMI8998_VAL 0x03
[all …]
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>
18 MT6360_LED_ISNK1 = 0,
27 #define MT6360_REG_RGBEN 0x380
28 #define MT6360_REG_ISNK(_led_no) (0x381 + (_led_no))
29 #define MT6360_ISNK_ENMASK(_led_no) BIT(7 - (_led_no))
30 #define MT6360_ISNK_MASK GENMASK(4, 0)
37 #define MT6360_REG_FLEDEN 0x37E
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/leds/
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 …]
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 …]
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 …]
/linux-6.12.1/drivers/hid/
Dhid-gt683r.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * MSI GT683R led driver
14 #include "hid-ids.h"
25 GT683R_LED_OFF = 0,
32 GT683R_LED_BACK = 0,
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
67 for (i = 0; i < GT683R_LED_COUNT; i++) { in gt683r_brightness_set()
68 if (led_cdev == &led->led_devs[i]) in gt683r_brightness_set()
73 led->brightnesses[i] = brightness; in gt683r_brightness_set()
[all …]
/linux-6.12.1/drivers/net/wireless/broadcom/b43/
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 …]

12345678910>>...42