Skip to content

Commit

Permalink
dt-bindings: pwm-backlight: Add a num-interpolation-steps property
Browse files Browse the repository at this point in the history
The num-interpolated-steps property specifies the number of
interpolated steps between each value of brightness-level table. This is
useful for high resolution PWMs to not have to list out every possible
value in the brightness-level array.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Enric Balletbo i Serra authored and Lee Jones committed Jul 4, 2018
1 parent 573fe6d commit 1e5e7cc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ 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.
- 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
Expand All @@ -39,3 +44,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>;
};

0 comments on commit 1e5e7cc

Please sign in to comment.