Home
last modified time | relevance | path

Searched full:brightness (Results 1 – 25 of 577) sorted by relevance

12345678910>>...24

/linux/arch/powerpc/platforms/powermac/
H A Dbacklight.c36 * in-kernel control of the brightness needs to be disabled. This should
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()
[all …]
/linux/Documentation/devicetree/bindings/leds/backlight/
H A Dcommon.yaml20 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 …]
H A Dpwm-backlight.yaml47 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>;
H A Dti,lm3509.yaml32 ti,brightness-rate-of-change-us:
33 description: Brightness Rate of Change in microseconds.
66 default-brightness:
71 max-brightness:
100 ti,brightness-rate-of-change-us = <52000>;
109 default-brightness = <12>;
110 max-brightness = <31>;
128 default-brightness = <12>;
133 default-brightness = <15>;
/linux/drivers/video/backlight/
H A Dktd253-backlight.c77 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()
167 brightness = KTD253_DEFAULT_RATIO; in ktd253_backlight_probe()
168 if (brightness > max_brightness) { in ktd253_backlight_probe()
[all …]
H A Daat2870_bl.c24 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=%d, power=%d, state=%d\n", in aat2870_bl_update_status()
70 bd->props.brightness, bd->props.power, bd->props.state); in aat2870_bl_update_status()
73 (u8)aat2870_brightness(aat2870_bl, brightness)); in aat2870_bl_update_status()
77 if (brightness == 0) { in aat2870_bl_update_status()
[all …]
H A Dktd2801-backlight.c36 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 exceeds max\n"); in ktd2801_backlight_probe()
86 brightness = max_brightness; in ktd2801_backlight_probe()
[all …]
H A Dmt6370-backlight.c75 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 + 1; in mt6370_bl_get_brightness()
[all …]
H A Drt4831-backlight.c42 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 …]
H A Dmp3309c.c116 int brightness = backlight_get_brightness(bl); in mp3309c_bl_update_status() local
127 chip->pdata->levels[brightness], in mp3309c_bl_update_status()
143 if (brightness > 0) { in mp3309c_bl_update_status()
152 if (brightness == 0) in mp3309c_bl_update_status()
160 * The first time, before setting brightness, we must enable the in mp3309c_bl_update_status()
176 analog_val = brightness; in mp3309c_bl_update_status()
185 if (brightness > 0) in mp3309c_bl_update_status()
233 * Analog (by I2C commands) control mode: fixed 0..31 brightness in mp3309c_parse_fwnode()
245 * PWM control mode: check for brightness level in DT in mp3309c_parse_fwnode()
247 if (device_property_present(dev, "brightness-levels")) { in mp3309c_parse_fwnode()
[all …]
H A Dda9052_bl.c39 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 = 0; in da9052_backlight_probe()
143 wleds->brightness = 0; in da9052_backlight_remove()
H A Dpwm_bl.c33 int brightness);
35 int brightness);
75 static int compute_duty_cycle(struct pwm_bl_data *pb, int brightness, struct pwm_state *state) in compute_duty_cycle() argument
81 duty_cycle = pb->levels[brightness]; in compute_duty_cycle()
83 duty_cycle = brightness; in compute_duty_cycle()
94 int brightness = backlight_get_brightness(bl); in pwm_backlight_update_status() local
98 brightness = pb->notify(pb->dev, brightness); in pwm_backlight_update_status()
100 if (brightness > 0) { in pwm_backlight_update_status()
102 state.duty_cycle = compute_duty_cycle(pb, brightness, &state); in pwm_backlight_update_status()
125 pb->notify_after(pb->dev, brightness); in pwm_backlight_update_status()
[all …]
H A Dpandora_bl.c41 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 != 0) in pandora_backlight_update_status()
135 bl->props.brightness = MAX_USER_VALUE; in pandora_backlight_probe()
/linux/Documentation/leds/
H A Dleds-lm3556.rst26 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/drivers/platform/x86/
H A Dsilicom-platform.c201 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 = 1,
[all …]
/linux/drivers/hid/
H A Dhid-lg-g15.c76 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()
[all …]
/linux/include/linux/platform_data/x86/
H A Dnvidia-wmi-ec-backlight.h13 * @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/Documentation/devicetree/bindings/leds/
H A Dleds-trigger-pattern.txt3 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 Dleds-netxbig.txt18 - bright-addr: Brightness register address on gpio-ext bus.
19 - max-brightness: Maximum brightness value.
43 max-brightness = <7>;
52 max-brightness = <7>;
62 max-brightness = <7>;
71 max-brightness = <7>;
81 max-brightness = <7>;
90 max-brightness = <7>;
/linux/include/linux/
H A Dled-class-flash.h34 /* set flash brightness */
36 u32 brightness);
37 /* get flash brightness */
39 u32 *brightness);
74 /* flash brightness value in microamperes along with its constraints */
75 struct led_flash_setting brightness; member
173 * led_set_flash_brightness - set flash LED brightness
175 * @brightness: the brightness to set it to
177 * Set a flash LED's brightness.
182 u32 brightness);
[all …]
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00leds.c22 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/drivers/leds/
H A Dleds-ti-lmu-common.c20 int brightness) in ti_lmu_common_update_brightness() argument
27 * Brightness register update in ti_lmu_common_update_brightness()
30 * MSB brightness should be shifted. in ti_lmu_common_update_brightness()
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()
130 ret = device_property_read_u32(dev, "ti,brightness-resolution", in ti_lmu_common_get_brt_res()
134 "ti,brightness-resolution", in ti_lmu_common_get_brt_res()
/linux/Documentation/ABI/testing/
H A Dsysfs-class-backlight6 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/platform/chrome/wilco_ec/
H A Dkeyboard_leds.c18 #define WILCO_KBBL_MODE_FLAG_PWM BIT(1) /* Set brightness by percent. */
40 * @percent: Brightness in 0-100. Only meaningful in PWM mode.
79 static int set_kbbl(struct wilco_ec_device *ec, enum led_brightness brightness) in set_kbbl() argument
89 request.percent = brightness; in set_kbbl()
128 * Gets the current brightness, ensuring that the BIOS already initialized the
129 * backlight to PWM mode. If not in PWM mode, then the current brightness is
130 * meaningless, so set the brightness to WILCO_KBBL_DEFAULT_BRIGHTNESS.
132 * Return: Final brightness of the keyboard, or negative error code on failure.
166 enum led_brightness brightness) in wilco_keyboard_leds_set() argument
170 return set_kbbl(wkl->ec, brightness); in wilco_keyboard_leds_set()
[all …]
/linux/drivers/platform/chrome/
H A Dcros_kbd_led_backlight.c29 * @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()
[all …]

12345678910>>...24