Home
last modified time | relevance | path

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

12345678910>>...45

/Linux-v6.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
22 #define LP8860_DISP_CL1_BRT_MSB 0x00
23 #define LP8860_DISP_CL1_BRT_LSB 0x01
24 #define LP8860_DISP_CL1_CURR_MSB 0x02
25 #define LP8860_DISP_CL1_CURR_LSB 0x03
26 #define LP8860_CL2_BRT_MSB 0x04
27 #define LP8860_CL2_BRT_LSB 0x05
28 #define LP8860_CL2_CURRENT 0x06
29 #define LP8860_CL3_BRT_MSB 0x07
[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.
25 * individual clock for LED device.
40 #define MT6323_ISINK_CON0(i) (MT6323_ISINK0_CON0 + 0x8 * (i))
41 #define MT6323_ISINK_DIM_DUTY_MASK (0x1f << 8)
46 #define MT6323_ISINK_CON1(i) (MT6323_ISINK0_CON1 + 0x8 * (i))
47 #define MT6323_ISINK_DIM_FSEL_MASK (0xffff)
51 #define MT6323_ISINK_CON2(i) (MT6323_ISINK0_CON2 + 0x8 * (i))
53 #define MT6323_ISINK_CH_STEP_MASK (0x7 << 12)
[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-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-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 …]
Dleds-wm831x-status.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED driver for WM831x status LEDs
38 static void wm831x_status_set(struct wm831x_status *led) in wm831x_status_set() argument
42 mutex_lock(&led->mutex); in wm831x_status_set()
44 led->reg_val &= ~(WM831X_LED_SRC_MASK | WM831X_LED_MODE_MASK | in wm831x_status_set()
47 spin_lock_irqsave(&led->value_lock, flags); in wm831x_status_set()
49 led->reg_val |= led->src << WM831X_LED_SRC_SHIFT; in wm831x_status_set()
50 if (led->blink) { in wm831x_status_set()
51 led->reg_val |= 2 << WM831X_LED_MODE_SHIFT; in wm831x_status_set()
52 led->reg_val |= led->blink_time << WM831X_LED_DUR_SHIFT; in wm831x_status_set()
[all …]
/Linux-v6.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-v6.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
12 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
49 /* maximum LED current in movie mode */
51 /* maximum LED current in flash mode */
57 /* max LED brightness level */
67 /* corresponding LED Flash class device */
96 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/led-class-flash.h>
26 #define KTD2692_FLASH_MODE_TIMEOUT_DISABLE 0
33 #define KTD2692_REG_LVP_BASE 0x00
34 #define KTD2692_REG_FLASH_TIMEOUT_BASE 0x20
35 #define KTD2692_REG_MM_MIN_CURR_THRESHOLD_BASE 0x40
36 #define KTD2692_REG_MOVIE_CURRENT_BASE 0x60
37 #define KTD2692_REG_FLASH_CURRENT_BASE 0x80
38 #define KTD2692_REG_MODE_BASE 0xA0
[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-v6.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 …]
/Linux-v6.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-v6.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 …]
/Linux-v6.1/drivers/gpu/drm/nouveau/
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()
44 div = nvif_rd32(device, 0x61c880) & 0x00ffffff; in nouveau_led_get_brightness()
45 duty = nvif_rd32(device, 0x61c884) & 0x00ffffff; in nouveau_led_get_brightness()
47 if (div > 0) in nouveau_led_get_brightness()
50 return 0; 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()
[all …]
/Linux-v6.1/arch/arm/boot/dts/
Domap3-echo.dts1 // SPDX-License-Identifier: GPL-2.0-only
5 /dts-v1/;
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
14 compatible = "amazon,omap3-echo", "ti,omap3630", "ti,omap3";
17 cpu@0 {
18 cpu0-supply = <&vdd1_reg>;
24 reg = <0x80000000 0xc600000>; /* 198 MB */
28 compatible = "regulator-fixed";
29 regulator-name = "vcc5v";
[all …]

12345678910>>...45