| /linux/drivers/leds/ |
| H A D | leds-bd2802.c | 1 // 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 …]
|
| H A D | leds-lm3692x.c | 1 // 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 …]
|
| H A D | leds-max8997.c | 1 // 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 …]
|
| H A D | leds-cpcap.c | 1 // 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 …]
|
| H A D | leds-lm3697.c | 1 // 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 …]
|
| H A D | leds-lm3533.c | 1 // 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 …]
|
| H A D | leds-bcm6328.c | 1 // 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 …]
|
| H A D | leds-mt6323.c | 1 // 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 …]
|
| H A D | leds-wm8350.c | 1 // 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 …]
|
| H A D | leds-ns2.c | 1 // 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 …]
|
| H A D | leds-wm831x-status.c | 1 // 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 …]
|
| H A D | leds-regulator.c | 1 // 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 …]
|
| H A D | leds-lp8860.c | 1 // 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 …]
|
| /linux/sound/usb/caiaq/ |
| H A D | control.c | 1 // 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/drivers/leds/flash/ |
| H A D | leds-lm3601x.c | 1 // 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 …]
|
| H A D | leds-aat1290.c | 1 // 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 D | leds-max77693.c | 1 // 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 …]
|
| H A D | leds-ktd2692.c | 1 // 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 …]
|
| H A D | leds-mt6360.c | 1 // 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/Documentation/devicetree/bindings/leds/ |
| H A D | leds-lp55xx.yaml | 1 # 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 …]
|
| H A D | leds-mt6360.yaml | 1 # 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/drivers/hid/ |
| H A D | hid-gt683r.c | 1 // 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/drivers/net/wireless/broadcom/b43/ |
| H A D | leds.c | 1 // 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/net/dsa/mv88e6xxx/ |
| H A D | leds.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 /* Offset 0x16: LED control */ 29 *val &= 0x3ff; in mv88e6xxx_port_led_read() 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() [all …]
|
| /linux/Documentation/ABI/testing/ |
| H A D | sysfs-class-led-trigger-netdev | 1 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 13 Specifies the duration of the LED blink in milliseconds. 21 What: /sys/class/leds/<led>/link 24 Contact: linux-leds@vger.kernel.org 28 If set to 0 (default), the LED's normal state is off. 30 If set to 1, the LED's normal state reflects the link state 32 Setting this value also immediately changes the LED state. [all …]
|