/linux-6.15/Documentation/devicetree/bindings/leds/backlight/ |
D | common.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Lee Jones <lee@kernel.org> 11 - Daniel Thompson <daniel.thompson@linaro.org> 12 - Jingoo Han <jingoohan1@gmail.com> 20 default-brightness: 22 The default brightness that should be applied to the LED by the operating 23 system on start-up. The brightness should not exceed the brightness the 27 max-brightness: [all …]
|
D | ti,lm3509.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Patrick Gansterer <paroga@paroga.com> 23 "#address-cells": 26 "#size-cells": 29 reset-gpios: 32 ti,brightness-rate-of-change-us: 33 description: Brightness Rate of Change in microseconds. 36 ti,oled-mode: [all …]
|
D | qcom-wled.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/leds/backlight/qcom-wled.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Bjorn Andersson <andersson@kernel.org> 11 - Kiran Gunda <quic_kgunda@quicinc.com> 21 - qcom,pm8941-wled 22 - qcom,pmi8950-wled 23 - qcom,pmi8994-wled 24 - qcom,pmi8998-wled [all …]
|
D | pwm-backlight.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 3 --- 4 $id: http://devicetree.org/schemas/leds/backlight/pwm-backlight.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: pwm-backlight 10 - Lee Jones <lee@kernel.org> 11 - Daniel Thompson <daniel.thompson@linaro.org> 12 - Jingoo Han <jingoohan1@gmail.com> 15 - $ref: common.yaml# 19 const: pwm-backlight [all …]
|
D | lm3630a-backlight.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: TI LM3630A High-Efficiency Dual-String White LED 10 - Lee Jones <lee@kernel.org> 11 - Daniel Thompson <daniel.thompson@linaro.org> 12 - Jingoo Han <jingoohan1@gmail.com> 15 The LM3630A is a current-mode boost converter which supplies the power and 26 '#address-cells': [all …]
|
D | mediatek,mt6370-backlight.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/leds/backlight/mediatek,mt6370-backlight.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - ChiaEn Wu <chiaen_wu@richtek.com> 21 - $ref: common.yaml# 26 - mediatek,mt6370-backlight 27 - mediatek,mt6372-backlight 29 default-brightness: 32 max-brightness: [all …]
|
D | kinetic,ktd2801.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Kinetic Technologies KTD2801 one-wire backlight 10 - Duje Mihanović <duje.mihanovic@skole.hr> 19 - $ref: common.yaml# 25 ctrl-gpios: 28 default-brightness: true 29 max-brightness: true 32 - compatible [all …]
|
/linux-6.15/drivers/video/backlight/ |
D | mp3309c.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 92 /* I2C register #0 - Device enable */ in mp3309c_enable_device() 93 ret = regmap_update_bits(chip->regmap, REG_I2C_0, REG_I2C_0_EN, in mp3309c_enable_device() 99 * I2C register #1 - Set working mode: in mp3309c_enable_device() 100 * - enable/disable synchronous mode in mp3309c_enable_device() 101 * - set overvoltage protection (OVP) in mp3309c_enable_device() 104 if (chip->pdata->sync_mode) in mp3309c_enable_device() 106 reg_val |= chip->pdata->over_voltage_protection; in mp3309c_enable_device() 107 ret = regmap_write(chip->regmap, REG_I2C_1, reg_val); in mp3309c_enable_device() 117 int brightness = backlight_get_brightness(bl); in mp3309c_bl_update_status() local [all …]
|
D | ktd253-backlight.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Based on code and know-how from the Samsung GT-S7710 39 gpiod_set_value_cansleep(ktd253->gpiod, 1); in ktd253_backlight_set_max_ratio() 62 gpiod_set_value(ktd253->gpiod, 0); in ktd253_backlight_stepdown() 64 gpiod_set_value(ktd253->gpiod, 1); in ktd253_backlight_stepdown() 65 ns = ktime_get_ns() - ns; in ktd253_backlight_stepdown() 67 dev_err(ktd253->dev, "PCM on backlight took too long (%llu ns)\n", ns); in ktd253_backlight_stepdown() 68 return -EAGAIN; in ktd253_backlight_stepdown() 77 int brightness = backlight_get_brightness(bl); in ktd253_backlight_update_status() local 79 u16 current_ratio = ktd253->ratio; in ktd253_backlight_update_status() [all …]
|
D | ktd2801-backlight.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * https://www.kinet-ic.com/uploads/web/KTD2801/KTD2801-04b.pdf 8 #include <linux/leds-expresswire.h> 36 u8 brightness = (u8) backlight_get_brightness(bd); in ktd2801_update_status() local 39 expresswire_power_off(&ktd2801->props); in ktd2801_update_status() 40 ktd2801->was_on = false; in ktd2801_update_status() 44 if (!ktd2801->was_on) { in ktd2801_update_status() 45 expresswire_enable(&ktd2801->props); in ktd2801_update_status() 46 ktd2801->was_on = true; in ktd2801_update_status() 49 expresswire_write_u8(&ktd2801->props, brightness); in ktd2801_update_status() [all …]
|
D | as3711_bl.c | 1 // SPDX-License-Identifier: GPL-2.0 28 int brightness; member 41 switch (su->type) { in to_supply() 51 unsigned int brightness) in as3711_set_brightness_auto_i() argument 54 struct as3711 *as3711 = supply->as3711; in as3711_set_brightness_auto_i() 55 const struct as3711_bl_pdata *pdata = supply->pdata; in as3711_set_brightness_auto_i() 59 if (pdata->su2_auto_curr1) in as3711_set_brightness_auto_i() 60 ret = regmap_write(as3711->regmap, AS3711_CURR1_VALUE, in as3711_set_brightness_auto_i() 61 brightness); in as3711_set_brightness_auto_i() 62 if (!ret && pdata->su2_auto_curr2) in as3711_set_brightness_auto_i() [all …]
|
D | pwm_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 33 int brightness); 35 int brightness); 43 if (pb->enabled) in pwm_backlight_power_on() 46 if (pb->power_supply) { in pwm_backlight_power_on() 47 err = regulator_enable(pb->power_supply); in pwm_backlight_power_on() 49 dev_err(pb->dev, "failed to enable power supply\n"); in pwm_backlight_power_on() 52 if (pb->post_pwm_on_delay) in pwm_backlight_power_on() 53 msleep(pb->post_pwm_on_delay); in pwm_backlight_power_on() 55 gpiod_set_value_cansleep(pb->enable_gpio, 1); in pwm_backlight_power_on() [all …]
|
D | led_bl.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (C) 2015-2019 Texas Instruments Incorporated - http://www.ti.com/ 30 if (priv->levels) in led_bl_set_brightness() 31 bkl_brightness = priv->levels[level]; in led_bl_set_brightness() 35 for (i = 0; i < priv->nb_leds; i++) in led_bl_set_brightness() 36 led_set_brightness(priv->leds[i], bkl_brightness); in led_bl_set_brightness() 38 priv->enabled = true; in led_bl_set_brightness() 45 if (!priv->enabled) in led_bl_power_off() 48 for (i = 0; i < priv->nb_leds; i++) in led_bl_power_off() 49 led_set_brightness(priv->leds[i], LED_OFF); in led_bl_power_off() [all …]
|
D | rt4831-backlight.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 #include <dt-bindings/leds/rt4831-backlight.h> 42 int brightness = backlight_get_brightness(bl_dev); in rt4831_bl_update_status() local 43 unsigned int enable = brightness ? RT4831_BLEN_MASK : 0; in rt4831_bl_update_status() 47 if (brightness) { in rt4831_bl_update_status() 48 v[0] = (brightness - 1) & RT4831_BLDIML_MASK; in rt4831_bl_update_status() 49 v[1] = ((brightness - 1) & RT4831_BLDIMH_MASK) >> RT4831_BLDIMH_SHIFT; in rt4831_bl_update_status() 51 ret = regmap_raw_write(priv->regmap, RT4831_REG_BLDIML, v, sizeof(v)); in rt4831_bl_update_status() 56 return regmap_update_bits(priv->regmap, RT4831_REG_ENABLE, RT4831_BLEN_MASK, enable); in rt4831_bl_update_status() 67 ret = regmap_read(priv->regmap, RT4831_REG_ENABLE, &val); in rt4831_bl_get_brightness() [all …]
|
D | tps65217_bl.c | 1 // SPDX-License-Identifier: GPL-2.0-only 30 rc = tps65217_set_bits(tps65217_bl->tps, TPS65217_REG_WLEDCTRL1, in tps65217_bl_enable() 34 dev_err(tps65217_bl->dev, in tps65217_bl_enable() 39 tps65217_bl->is_enabled = true; in tps65217_bl_enable() 41 dev_dbg(tps65217_bl->dev, "backlight enabled\n"); in tps65217_bl_enable() 50 rc = tps65217_clear_bits(tps65217_bl->tps, in tps65217_bl_disable() 55 dev_err(tps65217_bl->dev, in tps65217_bl_disable() 60 tps65217_bl->is_enabled = false; in tps65217_bl_disable() 62 dev_dbg(tps65217_bl->dev, "backlight disabled\n"); in tps65217_bl_disable() 71 int brightness = backlight_get_brightness(bl); in tps65217_bl_update_status() local [all …]
|
D | mt6370-backlight.c | 1 // SPDX-License-Identifier: GPL-2.0-only 76 int brightness = backlight_get_brightness(bl_dev); in mt6370_bl_update_status() local 81 if (brightness) { in mt6370_bl_update_status() 82 brightness_val[0] = (brightness - 1) & priv->dim2_mask; in mt6370_bl_update_status() 83 brightness_val[1] = (brightness - 1) >> priv->dim2_shift; in mt6370_bl_update_status() 85 ret = regmap_raw_write(priv->regmap, MT6370_REG_BL_DIM2, in mt6370_bl_update_status() 91 gpiod_set_value(priv->enable_gpio, !!brightness); in mt6370_bl_update_status() 93 enable_val = brightness ? MT6370_BL_EN_MASK : 0; in mt6370_bl_update_status() 94 return regmap_update_bits(priv->regmap, MT6370_REG_BL_EN, in mt6370_bl_update_status() 103 int brightness, ret; in mt6370_bl_get_brightness() local [all …]
|
/linux-6.15/drivers/platform/x86/ |
D | silicom-platform.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // silicom-platform.c - Silicom MEC170x platform driver 5 // Copyright (C) 2023 Henry Shi <henrys@silicom-usa.com> 15 #include <linux/led-class-multicolor.h> 52 #define CHANNEL_TO_OFFSET(chan) (((chan) >> 3) - 0x14) 201 enum led_brightness brightness = LED_OFF; in silicom_mec_led_mc_brightness_get() local 204 for (i = 0; i < mc_cdev->num_colors; i++) { in silicom_mec_led_mc_brightness_get() 205 mc_cdev->subled_info[i].brightness = in silicom_mec_led_mc_brightness_get() 206 silicom_mec_led_get(mc_cdev->subled_info[i].channel); in silicom_mec_led_mc_brightness_get() 207 /* Mark the overall brightness as LED_ON if any of the subleds are on */ in silicom_mec_led_mc_brightness_get() [all …]
|
D | lenovo-wmi-hotkey-utilities.c | 1 // SPDX-License-Identifier: GPL-2.0 16 #define LUD_WMI_METHOD_GUID "CE6C0974-0407-4F50-88BA-4FC3B6559AD8" 56 enum led_brightness brightness) in lsh_wmi_mute_led_set() argument 67 led_arg.id = brightness == LED_ON ? MIC_MUTE_LED_ON : MIC_MUTE_LED_OFF; in lsh_wmi_mute_led_set() 70 led_arg.id = brightness == LED_ON ? AUDIO_MUTE_LED_ON : AUDIO_MUTE_LED_OFF; in lsh_wmi_mute_led_set() 72 default: in lsh_wmi_mute_led_set() 73 return -EINVAL; in lsh_wmi_mute_led_set() 78 status = wmidev_evaluate_method(wpriv->led_wdev, 0, WMI_LUD_SET_FEATURE, &input, NULL); in lsh_wmi_mute_led_set() 80 return -EIO; in lsh_wmi_mute_led_set() 86 enum led_brightness brightness) in lsh_wmi_audiomute_led_set() argument [all …]
|
/linux-6.15/Documentation/devicetree/bindings/leds/ |
D | leds-pwm.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/leds/leds-pwm.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Pavel Machek <pavel@ucw.cz> 13 Each LED is represented as a sub-node of the pwm-leds device. Each 18 const: pwm-leds 21 "^led(-[0-9a-f]+)?$": 30 pwm-names: true 32 max-brightness: [all …]
|
/linux-6.15/drivers/leds/ |
D | leds-pwm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * linux/drivers/leds-pwm.c 9 * based on leds-gpio.c by Raphael Assenat <raph@8d.com> 41 enum led_brightness brightness) in led_pwm_set() argument 45 unsigned int max = led_dat->cdev.max_brightness; in led_pwm_set() 46 unsigned long long duty = led_dat->pwmstate.period; in led_pwm_set() 48 duty *= brightness; in led_pwm_set() 51 if (led_dat->active_low) in led_pwm_set() 52 duty = led_dat->pwmstate.period - duty; in led_pwm_set() 54 led_dat->pwmstate.duty_cycle = duty; in led_pwm_set() [all …]
|
D | leds-turris-omnia.c | 1 // 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 41 * struct omnia_leds - driver private data structure 45 * @brightness_knode: kernel node of the "brightness" device sysfs attribute (this is the 46 * driver specific global brightness, not the LED classdev brightness) [all …]
|
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> 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() 72 led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; in max8997_led_set_mode() [all …]
|
/linux-6.15/include/linux/ |
D | leds.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 11 #include <dt-bindings/leds/common.h> 32 /* This is obsolete/useless. We now support variable maximum brightness. */ 47 * struct led_lookup_data - represents a single LED lookup entry 65 * default <color:function> tuple, for backward compatibility 66 * with in-driver hard-coded LED names used as a fallback when 79 * only LEDs exposed by drivers of hot-pluggable devices should 93 unsigned int brightness; member 122 /* Brightness off also disables hw-blinking so it is a separate action */ 127 /* Set LED brightness level [all …]
|
/linux-6.15/drivers/hid/ |
D | hid-appletb-bl.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (c) 2017-2018 Ronald Tschalär 6 * Copyright (c) 2022-2023 Kerem Karabay <kekrby@gmail.com> 15 #include "hid-ids.h" 28 module_param_named(brightness, appletb_bl_def_brightness, int, 0444); 29 MODULE_PARM_DESC(brightness, "Default brightness:\n" 30 " 0 - Touchbar is off\n" 31 " 1 - Dim brightness\n" 32 " [2] - Full brightness"); 47 static int appletb_bl_set_brightness(struct appletb_bl *bl, u8 brightness) in appletb_bl_set_brightness() argument [all …]
|
/linux-6.15/Documentation/ABI/testing/ |
D | sysfs-class-led | 1 What: /sys/class/leds/<led>/brightness 6 Set the brightness of the LED. 8 Most LEDs don't have hardware brightness support, so will 9 just be turned on for non-zero brightness settings. 20 led_brightness = brightness * multi_intensity/max_brightness 23 Documentation/leds/leds-class-multicolor.rst. 30 Writing non-zero to this file while trigger is active changes the 31 top brightness trigger is going to use. 40 Maximum brightness level for this LED, default is 255 (LED_FULL). 42 If the LED does not support different brightness levels, this [all …]
|