| /linux/arch/powerpc/platforms/powermac/ |
| H A D | backlight.c | 75 int brightness; in pmac_backlight_key_worker() local 79 brightness = props->brightness + in pmac_backlight_key_worker() 83 if (brightness < 0) in pmac_backlight_key_worker() 84 brightness = 0; in pmac_backlight_key_worker() 85 else if (brightness > props->max_brightness) in pmac_backlight_key_worker() 86 brightness = props->max_brightness; in pmac_backlight_key_worker() 88 props->brightness = brightness; in pmac_backlight_key_worker() 107 static int __pmac_backlight_set_legacy_brightness(int brightness) in __pmac_backlight_set_legacy_brightness() argument 116 props->brightness = brightness * in __pmac_backlight_set_legacy_brightness() 120 if (props->brightness > props->max_brightness) in __pmac_backlight_set_legacy_brightness() [all …]
|
| /linux/drivers/platform/x86/ |
| H A 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() 284 .brightness [all...] |
| /linux/drivers/hid/ |
| H A D | hid-lg-g15.c | 76 enum led_brightness brightness; member 85 /* Protects the transfer_buf and led brightness */ 112 hid_err(g15->hdev, "Error getting backlight brightness: %d\n", ret); in lg_g13_get_leds_state() 125 g15->leds[LG_G15_KBD_BRIGHTNESS].brightness = high; in lg_g13_get_leds_state() 130 g15->leds[LG_G15_KBD_BRIGHTNESS].brightness = 0; in lg_g13_get_leds_state() 138 hid_err(g15->hdev, "Error getting macro LED brightness: %d\n", ret); in lg_g13_get_leds_state() 143 g15->leds[i].brightness = !!(tbuf[1] & (1 << (i - LG_G15_MACRO_PRESET1))); in lg_g13_get_leds_state() 165 enum led_brightness brightness) in lg_g13_kbd_led_write() argument 173 led_mc_calc_color_components(&g15_led->mcdev, brightness); in lg_g13_kbd_led_write() 176 tbuf[1] = subleds[0].brightness; in lg_g13_kbd_led_write() 193 lg_g13_kbd_led_set(struct led_classdev * led_cdev,enum led_brightness brightness) lg_g13_kbd_led_set() argument 216 lg_g13_mkey_led_set(struct led_classdev * led_cdev,enum led_brightness brightness) lg_g13_mkey_led_set() argument 305 enum led_brightness brightness; lg_g15_led_get() local 316 lg_g15_led_set(struct led_classdev * led_cdev,enum led_brightness brightness) lg_g15_led_set() argument 372 enum led_brightness brightness[LG_G15_BRIGHTNESS_MAX]; lg_g15_leds_changed_work() local 449 lg_g510_kbd_led_write(struct lg_g15_data * g15,struct lg_g15_led * g15_led,enum led_brightness brightness) lg_g510_kbd_led_write() argument 478 lg_g510_kbd_led_set(struct led_classdev * led_cdev,enum led_brightness brightness) lg_g510_kbd_led_set() argument 545 enum led_brightness brightness; lg_g510_mkey_led_get() local 556 lg_g510_mkey_led_set(struct led_classdev * led_cdev,enum led_brightness brightness) lg_g510_mkey_led_set() argument [all...] |
| /linux/drivers/video/backlight/ |
| H A D | aat2870_bl.c | 24 int brightness; /* current brightness */ member 28 int brightness) in aat2870_brightness() argument 33 val = brightness * (aat2870_bl->max_current - 1); in aat2870_brightness() 61 int brightness = backlight_get_brightness(bd); in aat2870_bl_update_status() local 64 if ((brightness < 0) || (bd->props.max_brightness < brightness)) { in aat2870_bl_update_status() 65 dev_err(&bd->dev, "invalid brightness, %d\n", brightness); in aat2870_bl_update_status() 69 dev_dbg(&bd->dev, "brightness in aat2870_bl_update_status() [all...] |
| H A D | mt6370-backlight.c | 75 int brightness = backlight_get_brightness(bl_dev); in mt6370_bl_update_status() local 80 if (brightness) { in mt6370_bl_update_status() 81 brightness_val[0] = (brightness - 1) & priv->dim2_mask; in mt6370_bl_update_status() 82 brightness_val[1] = (brightness - 1) >> priv->dim2_shift; in mt6370_bl_update_status() 90 gpiod_set_value(priv->enable_gpio, !!brightness); in mt6370_bl_update_status() 92 enable_val = brightness ? MT6370_BL_EN_MASK : 0; in mt6370_bl_update_status() 102 int brightness, ret; in mt6370_bl_get_brightness() local 116 brightness = brightness_val[1] << priv->dim2_shift; in mt6370_bl_get_brightness() 117 brightness += brightness_val[0] & priv->dim2_mask; in mt6370_bl_get_brightness() 119 return brightness in mt6370_bl_get_brightness() 133 u32 brightness, ovp_uV, ocp_uA; mt6370_init_backlight_properties() local [all...] |
| H A D | pandora_bl.c | 41 int brightness = bl->props.brightness; in pandora_backlight_update_status() local 46 brightness = 0; in pandora_backlight_update_status() 48 brightness = 0; in pandora_backlight_update_status() 50 brightness = 0; in pandora_backlight_update_status() 52 if ((unsigned int)brightness > MAX_USER_VALUE) in pandora_backlight_update_status() 53 brightness = MAX_USER_VALUE; in pandora_backlight_update_status() 55 if (brightness == 0) { in pandora_backlight_update_status() 92 twl_i2c_write_u8(TWL_MODULE_PWM, MIN_VALUE + brightness, TWL_PWM0_OFF); in pandora_backlight_update_status() 95 if (brightness ! in pandora_backlight_update_status() [all...] |
| H A D | ktd253-backlight.c | 77 int brightness = backlight_get_brightness(bl); in ktd253_backlight_update_status() local 82 dev_dbg(ktd253->dev, "new brightness/ratio: %d/32\n", brightness); in ktd253_backlight_update_status() 84 target_ratio = brightness; in ktd253_backlight_update_status() 148 u32 brightness; in ktd253_backlight_probe() local 156 ret = device_property_read_u32(dev, "max-brightness", &max_brightness); in ktd253_backlight_probe() 160 /* Clamp brightness to hardware max */ in ktd253_backlight_probe() 161 dev_err(dev, "illegal max brightness specified\n"); in ktd253_backlight_probe() 165 ret = device_property_read_u32(dev, "default-brightness", &brightness); in ktd253_backlight_probe() [all...] |
| H A 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_BRIGHTNES in rt4831_parse_backlight_properties() [all...] |
| H A D | da9052_bl.c | 39 uint brightness; member 71 if (wleds->brightness) { in da9052_adjust_wled_brightness() 73 wleds->brightness); in da9052_adjust_wled_brightness() 83 int brightness = bl->props.brightness; in da9052_backlight_update_status() local 86 wleds->brightness = brightness; in da9052_backlight_update_status() 96 return wleds->brightness; in da9052_backlight_get_brightness() 115 wleds->brightness = 0; in da9052_backlight_probe() 132 bl->props.brightness in da9052_backlight_probe() [all...] |
| H A D | ktd2801-backlight.c | 36 u8 brightness = (u8) backlight_get_brightness(bd); in ktd2801_update_status() local 49 expresswire_write_u8(&ktd2801->props, brightness); in ktd2801_update_status() 64 u32 brightness, max_brightness; in ktd2801_backlight_probe() local 73 ret = device_property_read_u32(dev, "max-brightness", &max_brightness); in ktd2801_backlight_probe() 77 dev_err(dev, "illegal max brightness specified\n"); in ktd2801_backlight_probe() 81 ret = device_property_read_u32(dev, "default-brightness", &brightness); in ktd2801_backlight_probe() 83 brightness = KTD2801_DEFAULT_BRIGHTNESS; in ktd2801_backlight_probe() 84 if (brightness > max_brightness) { in ktd2801_backlight_probe() 85 dev_err(dev, "default brightness exceed in ktd2801_backlight_probe() [all...] |
| H A D | ams369fg06.c | 227 static int ams369fg06_gamma_ctl(struct ams369fg06 *lcd, int brightness) in ams369fg06_gamma_ctl() argument 232 if ((brightness >= 0) && (brightness <= 50)) in ams369fg06_gamma_ctl() 234 else if ((brightness > 50) && (brightness <= 100)) in ams369fg06_gamma_ctl() 236 else if ((brightness > 100) && (brightness <= 150)) in ams369fg06_gamma_ctl() 238 else if ((brightness > 150) && (brightness <= 200)) in ams369fg06_gamma_ctl() 240 else if ((brightness > 20 in ams369fg06_gamma_ctl() 410 int brightness = bd->props.brightness; ams369fg06_set_brightness() local [all...] |
| H A D | backlight.c | 183 return sysfs_emit(buf, "%d\n", bd->props.brightness); in brightness_show() 187 unsigned long brightness) in backlight_device_set_brightness() argument 193 if (brightness > bd->props.max_brightness) in backlight_device_set_brightness() 196 pr_debug("set brightness to %lu\n", brightness); in backlight_device_set_brightness() 197 bd->props.brightness = brightness; in backlight_device_set_brightness() 214 unsigned long brightness; in brightness_store() local 216 rc = kstrtoul(buf, 0, &brightness); in brightness_store() 220 rc = backlight_device_set_brightness(bd, brightness); in brightness_store() 224 static DEVICE_ATTR_RW(brightness); 256 rc = sysfs_emit(buf, "%d\n", bd->props.brightness); in actual_brightness_show() [all …]
|
| /linux/drivers/gpu/drm/amd/display/amdgpu_dm/ |
| H A D | amdgpu_dm_backlight.c | 198 u32 brightness = scale_input_to_fw(max, *user_brightness); in convert_custom_brightness() 209 * Handle the case where brightness is below the first data point in convert_custom_brightness() 212 if (brightness < caps->luminance_data[0].input_signal) { in convert_custom_brightness() 213 lum = DIV_ROUND_CLOSEST(caps->luminance_data[0].luminance * brightness, in convert_custom_brightness() 225 if (signal == brightness) { in convert_custom_brightness() 230 if (signal < brightness) in convert_custom_brightness() 251 (brightness - lower_signal), 254 *user_brightness = scale_fw_to_input(max, DIV_ROUND_CLOSEST(lum * brightness, 101)); in convert_brightness_from_user() 261 uint32_t brightness) in convert_brightness_from_user() 266 return brightness; 189 u32 brightness = scale_input_to_fw(max, *user_brightness); convert_custom_brightness() local 253 convert_brightness_from_user(const struct amdgpu_dm_backlight_caps * caps,uint32_t brightness) convert_brightness_from_user() argument 270 convert_brightness_to_user(const struct amdgpu_dm_backlight_caps * caps,uint32_t brightness) convert_brightness_to_user() argument 325 u32 brightness = 0; amdgpu_dm_backlight_set_level() local [all...] |
| /linux/drivers/net/wireless/ralink/rt2x00/ |
| H A 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/Documentation/leds/ |
| H A 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/Documentation/devicetree/bindings/leds/ |
| H A 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
|
| H A D | leds-netxbig.txt | |
| /linux/Documentation/ABI/testing/ |
| H A 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 43 brightness). 56 (RW) Read or write the specific brightness level at which the [all …]
|
| /linux/drivers/gpu/drm/nouveau/dispnv04/ |
| H A D | overlay.c | 46 struct drm_property *brightness; member 53 int brightness; member 220 u32 luma = (plane->brightness - 512) << 16 | plane->contrast; in nv10_set_params() 255 else if (property == nv_plane->props.brightness) in nv_set_property() 256 nv_plane->brightness = value; in nv_set_property() 311 plane->props.brightness = drm_property_create_range( in nv10_overlay_init() 319 !plane->props.brightness || in nv10_overlay_init() 332 plane->brightness = 512; in nv10_overlay_init() 334 plane->props.brightness, plane->brightness); in nv10_overlay_init() 377 int brightness = (nv_plane->brightness - 512) * 62 / 512; in nv04_update_plane() local [all …]
|
| /linux/drivers/leds/rgb/ |
| H A D | leds-lp5860-core.c | 36 enum led_brightness brightness) in lp5860_set_mc_brightness() argument 41 led_mc_calc_color_components(mc_cdev, brightness); in lp5860_set_mc_brightness() 46 unsigned int led_brightness = mc_cdev->subled_info[i].brightness; in lp5860_set_mc_brightness() 72 unsigned int brightness; in lp5860_led_init() local 76 ret = regmap_read(led->chip->regmap, LP5860_REG_PWM_BRI_START + channel, &brightness); in lp5860_led_init() 84 led->brightness = LP5860_MAX_BRIGHTNESS; in lp5860_led_init() 87 led->brightness = min(brightness, LP5860_MAX_BRIGHTNESS); in lp5860_led_init() 90 led->brightness = 0; in lp5860_led_init() 176 ret = lp5860_set_mc_brightness(&led->mc_cdev.led_cdev, led->brightness); in lp5860_init_dt() [all...] |
| /linux/drivers/leds/trigger/ |
| H A D | ledtrig-backlight.c | 21 int brightness; member 39 n->brightness = led->brightness; in ledtrig_backlight_notify_blank() 42 led_set_brightness_nosleep(led, n->brightness); in ledtrig_backlight_notify_blank() 89 led_set_brightness_nosleep(led, n->brightness); in bl_trig_invert_store() 111 n->brightness = led->brightness; in bl_trig_activate()
|
| /linux/drivers/net/wireless/realtek/rtw89/ |
| H A D | led_mc.c | 10 enum led_brightness brightness) in rtw89_led_mc_brightness_set() argument 19 led_mc_calc_color_components(mcdev, brightness); in rtw89_led_mc_brightness_set() 25 if (rtw_led->brightness_cache[i] == mcdev->subled_info[i].brightness) { in rtw89_led_mc_brightness_set() 32 e->pin, mcdev->subled_info[i].brightness); in rtw89_led_mc_brightness_set() 33 rtw89_led_gpio_set(rtwdev, e, mcdev->subled_info[i].brightness); in rtw89_led_mc_brightness_set() 34 rtw_led->brightness_cache[i] = mcdev->subled_info[i].brightness; in rtw89_led_mc_brightness_set() 56 rtw_led->subled[i].brightness = 0; in rtw89_led_mc_init()
|
| /linux/drivers/platform/chrome/ |
| H A D | cros_kbd_led_backlight.c | 29 * @brightness_get: Get LED brightness level. 30 * @brightness_set: Set LED brightness level. Must not sleep. 31 * @brightness_set_blocking: Set LED brightness level. It can block the 43 enum led_brightness brightness); 45 enum led_brightness brightness); 56 enum led_brightness brightness) in keyboard_led_set_brightness_acpi() argument 63 param.integer.value = brightness; in keyboard_led_set_brightness_acpi() 77 unsigned long long brightness; in keyboard_led_get_brightness_acpi() local 81 NULL, &brightness); in keyboard_led_get_brightness_acpi() 88 return brightness; in keyboard_led_get_brightness_acpi() 131 keyboard_led_set_brightness_ec_pwm(struct led_classdev * cdev,enum led_brightness brightness) keyboard_led_set_brightness_ec_pwm() argument [all...] |
| /linux/drivers/media/radio/ |
| H A D | radio-shark.c | 70 atomic_t brightness[NO_LEDS]; member 159 int i, res, brightness, actual_len; in shark_led_work() local 165 brightness = atomic_read(&shark->brightness[i]); in shark_led_work() 169 shark->transfer_buffer[1] = brightness; in shark_led_work() 171 shark->transfer_buffer[0] = brightness ? 0xA9 : 0xA8; in shark_led_work() 188 atomic_set(&shark->brightness[BLUE_LED], value); in shark_led_set_blue() 200 atomic_set(&shark->brightness[BLUE_PULSE_LED], 256 - value); in shark_led_set_blue_pulse() 212 atomic_set(&shark->brightness[RED_LED], value); in shark_led_set_red() 220 .brightness = LED_OFF, 226 .brightness = LED_OFF, [all …]
|
| /linux/drivers/leds/ |
| H A D | leds-ti-lmu-common.c | 20 int brightness) in ti_lmu_common_update_brightness() argument 37 brightness); in ti_lmu_common_update_brightness() 41 val = brightness >> LMU_11BIT_MSB_SHIFT; in ti_lmu_common_update_brightness() 43 val = brightness; in ti_lmu_common_update_brightness() 51 int ti_lmu_common_set_brightness(struct ti_lmu_bank *lmu_bank, int brightness) in ti_lmu_common_set_brightness() argument 53 return ti_lmu_common_update_brightness(lmu_bank, brightness); in ti_lmu_common_set_brightness()
|