diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-20 15:41:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-20 15:41:37 -0700 |
commit | 61c4fc1eaf736344904767d201b0d4f7a2ebaf79 (patch) | |
tree | 7d3b7a66ea5a5847570cbc3a372ffa9645821821 /Documentation/devicetree/bindings/leds | |
parent | 532c2b926dda11174700333a5dda5e3c0ee383f2 (diff) | |
parent | 633786736ed53a53b8d0a630cc3ff57381027081 (diff) | |
download | linux-61c4fc1eaf736344904767d201b0d4f7a2ebaf79.tar.gz linux-61c4fc1eaf736344904767d201b0d4f7a2ebaf79.tar.bz2 linux-61c4fc1eaf736344904767d201b0d4f7a2ebaf79.zip |
Merge tag 'backlight-next-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight
Pull backlight updates from Lee Jones:
"Core Framework:
- Remove unused/obsolete code/comments
New Functionality:
- Allow less granular brightness specification for high-res PWMs; pwm_bl
- Align brightness {inc,dec}rements with that perceived by the human-eye; pwm_bl
Fix-ups:
- Prepare for the introduction of -Wimplicit-fall-through; adp8860_bl
Bug Fixes:
- Fix uninitialised variable; pwm_bl"
* tag 'backlight-next-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
backlight: pwm_bl: Fix uninitialized variable
backlight: adp8860: Mark expected switch fall-through
backlight: Remove obsolete comment for ->state
dt-bindings: pwm-backlight: Move brightness-levels to optional
backlight: pwm_bl: Compute brightness of LED linearly to human eye
dt-bindings: pwm-backlight: Add a num-interpolation-steps property
backlight: pwm_bl: Linear interpolation between brightness-levels
Diffstat (limited to 'Documentation/devicetree/bindings/leds')
-rw-r--r-- | Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt index 310810906613..64fa2fbd98c9 100644 --- a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt +++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt @@ -3,13 +3,6 @@ pwm-backlight bindings Required properties: - compatible: "pwm-backlight" - pwms: OF device-tree PWM specification (see PWM binding[0]) - - brightness-levels: Array of distinct brightness levels. Typically these - are in the range from 0 to 255, but any range starting at 0 will do. - The actual brightness level (PWM duty cycle) will be interpolated - from these values. 0 means a 0% duty cycle (darkest/off), while the - last value in the array represents a 100% duty cycle (brightest). - - default-brightness-level: the default brightness level (index into the - array defined by the "brightness-levels" property) - power-supply: regulator for supply voltage Optional properties: @@ -21,6 +14,19 @@ Optional properties: and enabling the backlight using GPIO. - pwm-off-delay-ms: Delay in ms between disabling the backlight using GPIO and setting PWM value to 0. + - brightness-levels: Array of distinct brightness levels. Typically these + are in the range from 0 to 255, but any range starting at + 0 will do. The actual brightness level (PWM duty cycle) + will be interpolated from these values. 0 means a 0% duty + cycle (darkest/off), while the last value in the array + represents a 100% duty cycle (brightest). + - default-brightness-level: The default brightness level (index into the + array defined by the "brightness-levels" property). + - num-interpolated-steps: Number of interpolated steps between each value + of brightness-levels table. This way a high + resolution pwm duty cycle can be used without + having to list out every possible value in the + brightness-level array. [0]: Documentation/devicetree/bindings/pwm/pwm.txt [1]: Documentation/devicetree/bindings/gpio/gpio.txt @@ -39,3 +45,17 @@ Example: post-pwm-on-delay-ms = <10>; pwm-off-delay-ms = <10>; }; + +Example using num-interpolation-steps: + + backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 5000000>; + + brightness-levels = <0 2048 4096 8192 16384 65535>; + num-interpolated-steps = <2048>; + default-brightness-level = <4096>; + + power-supply = <&vdd_bl_reg>; + enable-gpios = <&gpio 58 0>; + }; |