/Linux-v5.4/arch/powerpc/platforms/powermac/ |
D | backlight.c | 109 int brightness; in pmac_backlight_key_worker() local 113 brightness = props->brightness + in pmac_backlight_key_worker() 117 if (brightness < 0) in pmac_backlight_key_worker() 118 brightness = 0; in pmac_backlight_key_worker() 119 else if (brightness > props->max_brightness) in pmac_backlight_key_worker() 120 brightness = props->max_brightness; in pmac_backlight_key_worker() 122 props->brightness = brightness; in pmac_backlight_key_worker() 141 static int __pmac_backlight_set_legacy_brightness(int brightness) in __pmac_backlight_set_legacy_brightness() argument 150 props->brightness = brightness * in __pmac_backlight_set_legacy_brightness() 154 if (props->brightness > props->max_brightness) in __pmac_backlight_set_legacy_brightness() [all …]
|
/Linux-v5.4/drivers/video/backlight/ |
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 = bd->props.brightness; 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() 71 bd->props.brightness, bd->props.power, bd->props.state); in aat2870_bl_update_status() 76 brightness = 0; in aat2870_bl_update_status() 79 (u8)aat2870_brightness(aat2870_bl, brightness)); in aat2870_bl_update_status() 83 if (brightness == 0) { in aat2870_bl_update_status() [all …]
|
D | da903x_bl.c | 40 static int da903x_backlight_set(struct backlight_device *bl, int brightness) in da903x_backlight_set() argument 50 brightness, 0x7f); in da903x_backlight_set() 54 if (data->current_brightness && brightness == 0) in da903x_backlight_set() 59 if (data->current_brightness == 0 && brightness) in da903x_backlight_set() 65 val = DA9030_WLED_TRIM(brightness); in da903x_backlight_set() 66 val |= brightness ? DA9030_WLED_CP_EN : 0; in da903x_backlight_set() 74 data->current_brightness = brightness; in da903x_backlight_set() 80 int brightness = bl->props.brightness; in da903x_backlight_update_status() local 83 brightness = 0; in da903x_backlight_update_status() 86 brightness = 0; in da903x_backlight_update_status() [all …]
|
D | ep93xx_bl.c | 23 int brightness; member 26 static int ep93xxbl_set(struct backlight_device *bl, int brightness) in ep93xxbl_set() argument 30 writel((brightness << 8) | EP93XX_MAX_COUNT, ep93xxbl->mmio); in ep93xxbl_set() 32 ep93xxbl->brightness = brightness; in ep93xxbl_set() 39 int brightness = bl->props.brightness; in ep93xxbl_update_status() local 43 brightness = 0; in ep93xxbl_update_status() 45 return ep93xxbl_set(bl, brightness); in ep93xxbl_update_status() 52 return ep93xxbl->brightness; in ep93xxbl_get_brightness() 97 bl->props.brightness = EP93XX_DEF_BRIGHT; in ep93xxbl_probe()
|
D | pcf50633-backlight.c | 22 unsigned int brightness; member 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() 115 bl_props.brightness = 0x3f; in pcf50633_bl_probe() 136 pcf_bl->brightness = pcf_bl->bl->props.brightness + 1; in pcf50633_bl_probe()
|
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() 107 int brightness = bl->props.brightness; in as3711_bl_update_status() local 111 __func__, bl->props.brightness, bl->props.power, in as3711_bl_update_status() [all …]
|
D | pandora_bl.c | 42 int brightness = bl->props.brightness; in pandora_backlight_update_status() local 47 brightness = 0; in pandora_backlight_update_status() 49 brightness = 0; in pandora_backlight_update_status() 51 brightness = 0; in pandora_backlight_update_status() 53 if ((unsigned int)brightness > MAX_USER_VALUE) in pandora_backlight_update_status() 54 brightness = MAX_USER_VALUE; in pandora_backlight_update_status() 56 if (brightness == 0) { in pandora_backlight_update_status() 93 twl_i2c_write_u8(TWL_MODULE_PWM, MIN_VALUE + brightness, TWL_PWM0_OFF); in pandora_backlight_update_status() 96 if (brightness != 0) in pandora_backlight_update_status() 138 bl->props.brightness = MAX_USER_VALUE; in pandora_backlight_probe()
|
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 | wm831x_bl.c | 26 static int wm831x_backlight_set(struct backlight_device *bl, int brightness) in wm831x_backlight_set() argument 30 int power_up = !data->current_brightness && brightness; in wm831x_backlight_set() 31 int power_down = data->current_brightness && !brightness; in wm831x_backlight_set() 64 WM831X_CS1_ISEL_MASK, brightness); in wm831x_backlight_set() 76 data->current_brightness = brightness; in wm831x_backlight_set() 94 int brightness = bl->props.brightness; in wm831x_backlight_update_status() local 97 brightness = 0; in wm831x_backlight_update_status() 100 brightness = 0; in wm831x_backlight_update_status() 103 brightness = 0; in wm831x_backlight_update_status() 105 return wm831x_backlight_set(bl, brightness); in wm831x_backlight_update_status() [all …]
|
D | 88pm860x_bl.c | 59 static int pm860x_backlight_set(struct backlight_device *bl, int brightness) in pm860x_backlight_set() argument 66 if (brightness > MAX_BRIGHTNESS) in pm860x_backlight_set() 69 value = brightness; in pm860x_backlight_set() 71 if (brightness) in pm860x_backlight_set() 78 if ((data->current_brightness == 0) && brightness) { in pm860x_backlight_set() 91 if (brightness == MAX_BRIGHTNESS) { in pm860x_backlight_set() 97 if (brightness == MAX_BRIGHTNESS) { in pm860x_backlight_set() 110 if (brightness == 0) in pm860x_backlight_set() 124 int brightness = bl->props.brightness; in pm860x_backlight_update_status() local 127 brightness = 0; in pm860x_backlight_update_status() [all …]
|
D | lm3639_bl.c | 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() 153 return bl->props.brightness; in lm3639_bled_get_brightness() 165 bl->props.brightness = reg_val; in lm3639_bled_get_brightness() [all …]
|
D | tosa_bl.c | 35 static void tosa_bl_set_backlight(struct tosa_bl_data *data, int brightness) in tosa_bl_set_backlight() argument 42 i2c_smbus_write_byte_data(data->i2c, DAC_CH2, (u8)(brightness & 0xff)); in tosa_bl_set_backlight() 45 gpio_set_value(TOSA_GPIO_BL_C20MA, brightness & 0x100); in tosa_bl_set_backlight() 47 tosa_bl_enable(spi, brightness); in tosa_bl_set_backlight() 55 int brightness = props->brightness; in tosa_bl_update_status() local 58 brightness = 0; in tosa_bl_update_status() 60 tosa_bl_set_backlight(data, brightness); in tosa_bl_update_status() 69 return props->brightness; in tosa_bl_get_brightness() 112 data->bl->props.brightness = 69; in tosa_bl_probe()
|
D | lm3630a_bl.c | 189 lm3630a_pwm_ctrl(pchip, bl->props.brightness, in lm3630a_bank_a_update_status() 191 return bl->props.brightness; in lm3630a_bank_a_update_status() 200 ret = lm3630a_write(pchip, REG_BRT_A, bl->props.brightness); in lm3630a_bank_a_update_status() 201 if (bl->props.brightness < 0x4) in lm3630a_bank_a_update_status() 212 return bl->props.brightness; in lm3630a_bank_a_update_status() 217 int brightness, rval; in lm3630a_bank_a_get_brightness() local 225 brightness = (rval & 0x01) << 8; in lm3630a_bank_a_get_brightness() 229 brightness |= rval; in lm3630a_bank_a_get_brightness() 241 brightness = rval; in lm3630a_bank_a_get_brightness() 244 bl->props.brightness = brightness; in lm3630a_bank_a_get_brightness() [all …]
|
D | max8925_bl.c | 32 static int max8925_backlight_set(struct backlight_device *bl, int brightness) in max8925_backlight_set() argument 39 if (brightness > MAX_BRIGHTNESS) in max8925_backlight_set() 42 value = brightness; in max8925_backlight_set() 48 if (!data->current_brightness && brightness) in max8925_backlight_set() 51 else if (!brightness) in max8925_backlight_set() 67 int brightness = bl->props.brightness; in max8925_backlight_update_status() local 70 brightness = 0; in max8925_backlight_update_status() 73 brightness = 0; in max8925_backlight_update_status() 76 brightness = 0; in max8925_backlight_update_status() 78 return max8925_backlight_set(bl, brightness); in max8925_backlight_update_status() [all …]
|
D | ams369fg06.c | 229 static int ams369fg06_gamma_ctl(struct ams369fg06 *lcd, int brightness) in ams369fg06_gamma_ctl() argument 234 if ((brightness >= 0) && (brightness <= 50)) in ams369fg06_gamma_ctl() 236 else if ((brightness > 50) && (brightness <= 100)) in ams369fg06_gamma_ctl() 238 else if ((brightness > 100) && (brightness <= 150)) in ams369fg06_gamma_ctl() 240 else if ((brightness > 150) && (brightness <= 200)) in ams369fg06_gamma_ctl() 242 else if ((brightness > 200) && (brightness <= 255)) in ams369fg06_gamma_ctl() 342 ret = ams369fg06_gamma_ctl(lcd, bd->props.brightness); in ams369fg06_power_on() 412 int brightness = bd->props.brightness; in ams369fg06_set_brightness() local 415 if (brightness < MIN_BRIGHTNESS || in ams369fg06_set_brightness() 416 brightness > bd->props.max_brightness) { in ams369fg06_set_brightness() [all …]
|
D | ot200_bl.c | 44 int brightness = bl->props.brightness; in ot200_backlight_update_status() local 47 brightness = 0; in ot200_backlight_update_status() 50 if (brightness == 0) in ot200_backlight_update_status() 60 MAX_COMP2 - dim_table[brightness]); in ot200_backlight_update_status() 61 data->current_brightness = brightness; in ot200_backlight_update_status() 115 props.brightness = 100; in ot200_backlight_probe()
|
/Linux-v5.4/Documentation/devicetree/bindings/leds/backlight/ |
D | pwm-backlight.txt | 17 - brightness-levels: Array of distinct brightness levels. Typically these 19 0 will do. The actual brightness level (PWM duty cycle) 23 - default-brightness-level: The default brightness level (index into the 24 array defined by the "brightness-levels" property). 26 of brightness-levels table. This way a high 29 brightness-level array. 40 brightness-levels = <0 4 8 16 32 64 128 255>; 41 default-brightness-level = <6>; 55 brightness-levels = <0 2048 4096 8192 16384 65535>; 57 default-brightness-level = <4096>;
|
/Linux-v5.4/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 …]
|
/Linux-v5.4/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-v5.4/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 …]
|
/Linux-v5.4/Documentation/ABI/testing/ |
D | sysfs-class-backlight | 6 Description of the scale of the brightness curve. 8 The human eye senses brightness approximately logarithmically, 9 hence linear changes in brightness are perceived as being 10 non-linear. To achieve a linear perception of brightness changes 12 backlights with a linear brightness curve. 17 The scale of the brightness curve is unknown. 20 The brightness changes linearly with each step. Brightness 25 The brightness changes non-linearly with each step. Brightness
|
D | sysfs-class-led | 1 What: /sys/class/leds/<led>/brightness 6 Set the brightness of the LED. Most LEDs don't 7 have hardware brightness support, so will just be turned on for 8 non-zero brightness settings. The value is between 0 and 14 top brightness trigger is going to use. 21 Maximum brightness level for this LED, default is 255 (LED_FULL). 23 If the LED does not support different brightness levels, this 30 Last hardware set brightness level for this LED. Some LEDs 36 the brightness. 38 Reading this file will return the last brightness level set [all …]
|
/Linux-v5.4/drivers/leds/ |
D | led-core.c | 63 unsigned long brightness; in led_timer_function() local 78 brightness = led_get_brightness(led_cdev); in led_timer_function() 79 if (!brightness) { in led_timer_function() 83 brightness = led_cdev->new_blink_brightness; in led_timer_function() 85 brightness = led_cdev->blink_brightness; in led_timer_function() 91 led_cdev->blink_brightness = brightness; in led_timer_function() 92 brightness = LED_OFF; in led_timer_function() 96 led_set_brightness_nosleep(led_cdev, brightness); in led_timer_function() 104 if (brightness) in led_timer_function() 108 if (!brightness) in led_timer_function() [all …]
|
D | uleds.c | 33 int brightness; member 40 enum led_brightness brightness) in uleds_brightness_set() argument 45 if (udev->brightness != brightness) { in uleds_brightness_set() 46 udev->brightness = brightness; in uleds_brightness_set() 137 if (count < sizeof(udev->brightness)) in uleds_read() 150 retval = copy_to_user(buffer, &udev->brightness, in uleds_read() 151 sizeof(udev->brightness)); in uleds_read() 153 retval = sizeof(udev->brightness); in uleds_read()
|
/Linux-v5.4/drivers/gpu/drm/nouveau/dispnv04/ |
D | overlay.c | 45 struct drm_property *brightness; member 52 int brightness; member 218 u32 luma = (plane->brightness - 512) << 16 | plane->contrast; in nv10_set_params() 253 else if (property == nv_plane->props.brightness) in nv_set_property() 254 nv_plane->brightness = value; in nv_set_property() 308 plane->props.brightness = drm_property_create_range( in nv10_overlay_init() 316 !plane->props.brightness || in nv10_overlay_init() 329 plane->brightness = 512; in nv10_overlay_init() 331 plane->props.brightness, plane->brightness); in nv10_overlay_init() 374 int brightness = (nv_plane->brightness - 512) * 62 / 512; in nv04_update_plane() local [all …]
|