Skip to content

Commit 1e5e7cc

Browse files
Enric Balletbo i SerraLee Jones
authored andcommitted
dt-bindings: pwm-backlight: Add a num-interpolation-steps property
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>
1 parent 573fe6d commit 1e5e7cc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Documentation/devicetree/bindings/leds/backlight/pwm-backlight.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ Optional properties:
2121
and enabling the backlight using GPIO.
2222
- pwm-off-delay-ms: Delay in ms between disabling the backlight using GPIO
2323
and setting PWM value to 0.
24+
- num-interpolated-steps: Number of interpolated steps between each value
25+
of brightness-levels table. This way a high
26+
resolution pwm duty cycle can be used without
27+
having to list out every possible value in the
28+
brightness-level array.
2429

2530
[0]: Documentation/devicetree/bindings/pwm/pwm.txt
2631
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
@@ -39,3 +44,17 @@ Example:
3944
post-pwm-on-delay-ms = <10>;
4045
pwm-off-delay-ms = <10>;
4146
};
47+
48+
Example using num-interpolation-steps:
49+
50+
backlight {
51+
compatible = "pwm-backlight";
52+
pwms = <&pwm 0 5000000>;
53+
54+
brightness-levels = <0 2048 4096 8192 16384 65535>;
55+
num-interpolated-steps = <2048>;
56+
default-brightness-level = <4096>;
57+
58+
power-supply = <&vdd_bl_reg>;
59+
enable-gpios = <&gpio 58 0>;
60+
};

0 commit comments

Comments
 (0)