/linux-6.8/arch/powerpc/platforms/powermac/ |
D | backlight.c | 36 * in-kernel control of the brightness needs to be disabled. This should 108 int brightness; in pmac_backlight_key_worker() local 112 brightness = props->brightness + in pmac_backlight_key_worker() 116 if (brightness < 0) in pmac_backlight_key_worker() 117 brightness = 0; in pmac_backlight_key_worker() 118 else if (brightness > props->max_brightness) in pmac_backlight_key_worker() 119 brightness = props->max_brightness; in pmac_backlight_key_worker() 121 props->brightness = brightness; in pmac_backlight_key_worker() 140 static int __pmac_backlight_set_legacy_brightness(int brightness) in __pmac_backlight_set_legacy_brightness() argument 149 props->brightness = brightness * in __pmac_backlight_set_legacy_brightness() [all …]
|
/linux-6.8/Documentation/devicetree/bindings/leds/backlight/ |
D | common.yaml | 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: 29 Normally the maximum brightness is determined by the hardware and this 31 on the brightness apart from what the driver says, as it could happen 36 brightness-levels: 38 Array of distinct brightness levels. The levels must be in the range 42 The 0 value means a 0% of brightness (darkest/off), while the last value 43 in the array represents a full 100% brightness (brightest). [all …]
|
D | pwm-backlight.yaml | 47 Number of interpolated steps between each value of brightness-levels 49 having to list out every possible value in the brightness-level array. 53 default-brightness-level: [brightness-levels] 54 num-interpolated-steps: [brightness-levels] 68 brightness-levels = <0 4 8 16 32 64 128 255>; 69 default-brightness-level = <6>; 83 brightness-levels = <0 2048 4096 8192 16384 65535>; 85 default-brightness-level = <4096>;
|
/linux-6.8/drivers/video/backlight/ |
D | ktd253-backlight.c | 78 int brightness = backlight_get_brightness(bl); in ktd253_backlight_update_status() local 83 dev_dbg(ktd253->dev, "new brightness/ratio: %d/32\n", brightness); in ktd253_backlight_update_status() 85 target_ratio = brightness; in ktd253_backlight_update_status() 149 u32 brightness; in ktd253_backlight_probe() local 157 ret = device_property_read_u32(dev, "max-brightness", &max_brightness); in ktd253_backlight_probe() 161 /* Clamp brightness to hardware max */ in ktd253_backlight_probe() 162 dev_err(dev, "illegal max brightness specified\n"); in ktd253_backlight_probe() 166 ret = device_property_read_u32(dev, "default-brightness", &brightness); in ktd253_backlight_probe() 168 brightness = KTD253_DEFAULT_RATIO; in ktd253_backlight_probe() 169 if (brightness > max_brightness) { in ktd253_backlight_probe() [all …]
|
D | aat2870_bl.c | 25 int brightness; /* current brightness */ member 29 int brightness) in aat2870_brightness() argument 34 val = brightness * (aat2870_bl->max_current - 1); in aat2870_brightness() 62 int brightness = backlight_get_brightness(bd); in aat2870_bl_update_status() local 65 if ((brightness < 0) || (bd->props.max_brightness < brightness)) { in aat2870_bl_update_status() 66 dev_err(&bd->dev, "invalid brightness, %d\n", brightness); in aat2870_bl_update_status() 70 dev_dbg(&bd->dev, "brightness=%d, power=%d, state=%d\n", in aat2870_bl_update_status() 71 bd->props.brightness, bd->props.power, bd->props.state); in aat2870_bl_update_status() 74 (u8)aat2870_brightness(aat2870_bl, brightness)); in aat2870_bl_update_status() 78 if (brightness == 0) { in aat2870_bl_update_status() [all …]
|
D | pcf50633-backlight.c | 22 unsigned int brightness; member 29 * Update the brightness limit for the pc50633 backlight. The actual brightness 34 * @limit: The brightness limit. Valid values are 0-63 58 else if (bl->props.brightness < pcf_bl->brightness_limit) in pcf50633_bl_update_status() 59 new_brightness = bl->props.brightness; in pcf50633_bl_update_status() 64 if (pcf_bl->brightness == new_brightness) in pcf50633_bl_update_status() 70 if (!pcf_bl->brightness) in pcf50633_bl_update_status() 76 pcf_bl->brightness = new_brightness; in pcf50633_bl_update_status() 85 return pcf_bl->brightness; in pcf50633_bl_get_brightness() 112 bl_props.brightness = pdata->default_brightness; in pcf50633_bl_probe() [all …]
|
D | mt6370-backlight.c | 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() 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() 103 int brightness, ret; in mt6370_bl_get_brightness() local 117 brightness = brightness_val[1] << priv->dim2_shift; in mt6370_bl_get_brightness() 118 brightness += brightness_val[0] & priv->dim2_mask; in mt6370_bl_get_brightness() 120 return brightness + 1; in mt6370_bl_get_brightness() [all …]
|
D | rt4831-backlight.c | 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() 94 u32 brightness, ocp_uA; in rt4831_parse_backlight_properties() local 99 ret = device_property_read_u32(dev, "max-brightness", &brightness); in rt4831_parse_backlight_properties() 101 brightness = RT4831_BLMAX_BRIGHTNESS; in rt4831_parse_backlight_properties() 103 bl_props->max_brightness = min_t(u32, brightness, RT4831_BLMAX_BRIGHTNESS); in rt4831_parse_backlight_properties() 105 ret = device_property_read_u32(dev, "default-brightness", &brightness); in rt4831_parse_backlight_properties() [all …]
|
D | lm3639_bl.c | 65 /* init brightness */ in lm3639_chip_init() 93 /* update and get brightness */ 111 pdata->pwm_set_intensity(bl->props.brightness, in lm3639_bled_update_status() 116 return bl->props.brightness; in lm3639_bled_update_status() 120 ret = regmap_write(pchip->regmap, REG_BL_CONF_4, bl->props.brightness); in lm3639_bled_update_status() 123 ret = regmap_write(pchip->regmap, REG_BL_CONF_3, bl->props.brightness); in lm3639_bled_update_status() 127 if (!bl->props.brightness) in lm3639_bled_update_status() 134 return bl->props.brightness; in lm3639_bled_update_status() 137 return bl->props.brightness; in lm3639_bled_update_status() 149 bl->props.brightness = pdata->pwm_get_intensity(); in lm3639_bled_get_brightness() [all …]
|
D | as3711_bl.c | 29 int brightness; member 52 unsigned int brightness) in as3711_set_brightness_auto_i() argument 62 brightness); in as3711_set_brightness_auto_i() 65 brightness); in as3711_set_brightness_auto_i() 68 brightness); in as3711_set_brightness_auto_i() 74 unsigned int brightness, in as3711_set_brightness_v() argument 77 if (brightness > 31) in as3711_set_brightness_v() 81 brightness << 4); in as3711_set_brightness_v() 100 * the brightness adjustment procedure. 107 int brightness; in as3711_bl_update_status() local [all …]
|
D | da9052_bl.c | 40 uint brightness; member 72 if (wleds->brightness) { in da9052_adjust_wled_brightness() 74 wleds->brightness); in da9052_adjust_wled_brightness() 84 int brightness = bl->props.brightness; in da9052_backlight_update_status() local 87 wleds->brightness = brightness; in da9052_backlight_update_status() 97 return wleds->brightness; in da9052_backlight_get_brightness() 116 wleds->brightness = 0; in da9052_backlight_probe() 132 bl->props.brightness = 0; in da9052_backlight_probe() 143 wleds->brightness = 0; in da9052_backlight_remove()
|
D | pwm_bl.c | 34 int brightness); 36 int brightness); 77 static int compute_duty_cycle(struct pwm_bl_data *pb, int brightness, struct pwm_state *state) in compute_duty_cycle() argument 83 duty_cycle = pb->levels[brightness]; in compute_duty_cycle() 85 duty_cycle = brightness; in compute_duty_cycle() 96 int brightness = backlight_get_brightness(bl); in pwm_backlight_update_status() local 100 brightness = pb->notify(pb->dev, brightness); in pwm_backlight_update_status() 102 if (brightness > 0) { in pwm_backlight_update_status() 104 state.duty_cycle = compute_duty_cycle(pb, brightness, &state); in pwm_backlight_update_status() 127 pb->notify_after(pb->dev, brightness); in pwm_backlight_update_status() [all …]
|
/linux-6.8/drivers/hid/ |
D | hid-lg-g15.c | 48 enum led_brightness brightness; member 56 /* Protects the transfer_buf and led brightness */ 76 hid_err(g15->hdev, "Error getting LED brightness: %d\n", ret); in lg_g15_update_led_brightness() 80 g15->leds[LG_G15_KBD_BRIGHTNESS].brightness = g15->transfer_buf[1]; in lg_g15_update_led_brightness() 81 g15->leds[LG_G15_LCD_BRIGHTNESS].brightness = g15->transfer_buf[2]; in lg_g15_update_led_brightness() 83 g15->leds[LG_G15_MACRO_PRESET1].brightness = in lg_g15_update_led_brightness() 85 g15->leds[LG_G15_MACRO_PRESET2].brightness = in lg_g15_update_led_brightness() 87 g15->leds[LG_G15_MACRO_PRESET3].brightness = in lg_g15_update_led_brightness() 89 g15->leds[LG_G15_MACRO_RECORD].brightness = in lg_g15_update_led_brightness() 100 enum led_brightness brightness; in lg_g15_led_get() local [all …]
|
/linux-6.8/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 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 49 Last hardware set brightness level for this LED. Some LEDs 55 the brightness. [all …]
|
/linux-6.8/Documentation/leds/ |
D | leds-lm3556.rst | 26 LM3556 Flash can be controlled through /sys/class/leds/flash/brightness file 28 * if STROBE pin is enabled, below example control brightness only, and 35 #echo 0 > /sys/class/leds/flash/brightness 39 #echo 1 > /sys/class/leds/flash/brightness 45 #echo 16 > /sys/class/leds/flash/brightness 54 LM3556 torch can be controlled through /sys/class/leds/torch/brightness file. 55 * if TORCH pin is enabled, below example control brightness only, 62 #echo 0 > /sys/class/leds/torch/brightness 66 #echo 1 > /sys/class/leds/torch/brightness 72 #echo 8 > /sys/class/leds/torch/brightness [all …]
|
D | leds-class-multicolor.rst | 12 via brightness file. 35 -rw-r--r-- 1 root root 4096 Oct 19 16:16 brightness 40 Multicolor Class Brightness Control 42 The brightness level for each LED is calculated based on the color LED 44 the requested brightness. 46 led_brightness = brightness * multi_intensity/max_brightness 49 A user first writes the multi_intensity file with the brightness levels 68 The user can control the brightness of that multicolor LED group by writing the 69 global 'brightness' control. Assuming a max_brightness of 255 the user 71 128 to the global brightness file then the values written to each LED will be [all …]
|
/linux-6.8/drivers/platform/x86/ |
D | silicom-platform.c | 201 enum led_brightness brightness = LED_OFF; in silicom_mec_led_mc_brightness_get() local 205 mc_cdev->subled_info[i].brightness = 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() 208 if (mc_cdev->subled_info[i].brightness != LED_OFF) in silicom_mec_led_mc_brightness_get() 209 brightness = LED_ON; in silicom_mec_led_mc_brightness_get() 212 return brightness; in silicom_mec_led_mc_brightness_get() 216 enum led_brightness brightness) in silicom_mec_led_mc_brightness_set() argument 221 led_mc_calc_color_components(mc_cdev, brightness); in silicom_mec_led_mc_brightness_set() 224 mc_cdev->subled_info[i].brightness); in silicom_mec_led_mc_brightness_set() 292 .brightness = 1, [all …]
|
/linux-6.8/include/linux/platform_data/x86/ |
D | nvidia-wmi-ec-backlight.h | 13 * @WMI_BRIGHTNESS_METHOD_LEVEL: Get/Set EC brightness level status 14 * @WMI_BRIGHTNESS_METHOD_SOURCE: Get/Set EC Brightness Source 24 * @WMI_BRIGHTNESS_MODE_GET: Get the current brightness level/source. 25 * @WMI_BRIGHTNESS_MODE_SET: Set the brightness level. 26 * @WMI_BRIGHTNESS_MODE_GET_MAX_LEVEL: Get the maximum brightness level. This 38 * enum wmi_brightness_source - Backlight brightness control source selection 39 * @WMI_BRIGHTNESS_SOURCE_GPU: Backlight brightness is controlled by the GPU. 40 * @WMI_BRIGHTNESS_SOURCE_EC: Backlight brightness is controlled by the 42 * @WMI_BRIGHTNESS_SOURCE_AUX: Backlight brightness is controlled over the 66 * brightness value when the WMI method ID is %WMI_BRIGHTNESS_METHOD_LEVEL, or
|
/linux-6.8/Documentation/devicetree/bindings/leds/ |
D | leds-trigger-pattern.txt | 3 The pattern is given by a series of tuples, of brightness and duration (ms). 4 The LED is expected to traverse the series and each brightness value for the 5 specified duration. Duration of 0 means brightness should immediately change to 10 change of brightness, i.e. the subsequent brightness will be applied without 22 LED brightness 31 2. To make the LED go instantly from one brightness value to another, we should 32 use zero-time lengths (the brightness must be same as the previous tuple's). So 39 It will make the LED stay off for one second, then stay at max brightness for 42 LED brightness
|
/linux-6.8/include/linux/ |
D | led-class-flash.h | 34 /* set flash brightness */ 36 u32 brightness); 37 /* get flash brightness */ 39 u32 *brightness); 72 /* flash brightness value in microamperes along with its constraints */ 73 struct led_flash_setting brightness; member 192 * led_set_flash_brightness - set flash LED brightness 194 * @brightness: the brightness to set it to 196 * Set a flash LED's brightness. 201 u32 brightness); [all …]
|
D | backlight.h | 86 /** enum backlight_scale - the type of scale used for brightness values 88 * The type of scale used for brightness values. 99 * The linear scale will increase brightness the same for each step. 106 * This is often used when the brightness values tries to adjust to 139 * to check if the display is blanked and set brightness accordingly. 149 * @get_brightness: Return the current backlight brightness. 153 * brightness property value is used. 157 * A brightness value which is 0 or a positive number. 184 * @brightness: The current brightness requested by the user. 187 * when the brightness is set via the sysfs attribute: [all …]
|
/linux-6.8/drivers/leds/ |
D | led-core.c | 68 unsigned long brightness; in led_timer_function() local 83 brightness = led_get_brightness(led_cdev); in led_timer_function() 84 if (!brightness) { in led_timer_function() 88 brightness = led_cdev->new_blink_brightness; in led_timer_function() 90 brightness = led_cdev->blink_brightness; in led_timer_function() 93 /* Store the current brightness value to be able in led_timer_function() 96 led_cdev->blink_brightness = brightness; in led_timer_function() 97 brightness = LED_OFF; in led_timer_function() 101 led_set_brightness_nosleep(led_cdev, brightness); in led_timer_function() 109 if (brightness) in led_timer_function() [all …]
|
D | leds-pwm.c | 42 enum led_brightness brightness) in led_pwm_set() argument 49 duty *= brightness; in led_pwm_set() 70 led_data->cdev.brightness = LED_OFF; in led_pwm_add() 98 /* set brightness */ in led_pwm_add() 101 led_data->cdev.brightness = led->max_brightness; in led_pwm_add() 105 uint64_t brightness; in led_pwm_add() local 107 brightness = led->max_brightness; in led_pwm_add() 108 brightness *= led_data->pwmstate.duty_cycle; in led_pwm_add() 109 do_div(brightness, led_data->pwmstate.period); in led_pwm_add() 110 led_data->cdev.brightness = brightness; in led_pwm_add() [all …]
|
D | leds-turris-omnia.c | 114 cmd[2] = led->subled_info[0].brightness; in omnia_led_send_color_cmd() 115 cmd[3] = led->subled_info[1].brightness; in omnia_led_send_color_cmd() 116 cmd[4] = led->subled_info[2].brightness; in omnia_led_send_color_cmd() 125 led->cached_channels[i] = led->subled_info[i].brightness; in omnia_led_send_color_cmd() 134 if (led->subled_info[i].brightness != led->cached_channels[i]) in omnia_led_channels_changed() 141 enum led_brightness brightness) in omnia_led_brightness_set_blocking() argument 151 * Only recalculate RGB brightnesses from intensities if brightness is in omnia_led_brightness_set_blocking() 153 * max_brightness as brightness). Otherwise we won't be using them and in omnia_led_brightness_set_blocking() 157 if (brightness || led->hwtrig) { in omnia_led_brightness_set_blocking() 158 led_mc_calc_color_components(mc_cdev, brightness ?: in omnia_led_brightness_set_blocking() [all …]
|
/linux-6.8/drivers/net/wireless/ralink/rt2x00/ |
D | rt2x00leds.c | 22 unsigned int brightness; in rt2x00leds_led_quality() local 55 brightness = ((LED_FULL / 6) * rssi) + 1; in rt2x00leds_led_quality() 56 if (brightness != led->led_dev.brightness) { in rt2x00leds_led_quality() 57 led->led_dev.brightness_set(&led->led_dev, brightness); in rt2x00leds_led_quality() 58 led->led_dev.brightness = brightness; in rt2x00leds_led_quality() 64 unsigned int brightness = enabled ? LED_FULL : LED_OFF; in rt2x00led_led_simple() local 69 led->led_dev.brightness_set(&led->led_dev, brightness); in rt2x00led_led_simple() 70 led->led_dev.brightness = brightness; in rt2x00led_led_simple() 99 led->led_dev.brightness = LED_OFF; in rt2x00leds_register_led() 203 led->led_dev.brightness = LED_OFF; in rt2x00leds_suspend_led() [all …]
|