[PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard

From: H. Nikolaus Schaller

Date: Tue Nov 24 2026 - 02:28:05 EST


Add support for a new device tree property
"pwm-enable-guard-period-us". If set, the driver applies a full
duty cycle (duty_cycle == period) for the given duration whenever
the PWM was disabled or had zero duty cycle (e.g. power-up, resume,
brightness 0). This covers the
requirements of such devices generically, without introducing a
chip specific backlight driver.

Signed-off-by: H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>
---

Notes:
Changes against V1:
- Describe the guard trigger using the PWM state actually tested
by the implementation (disabled or zero duty cycle).
- Remove the requirement that a disabled provider report zero duty-cycle.
- Remove the redundant uint32 $ref for the standard -us suffix
after dt_binding_check reported a schema error.
- Binding semantics and code-consistency review assisted by ChatGPT;
clarify that full duty is requested, not guaranteed at the output.

.../leds/backlight/pwm-backlight.yaml | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml
index b71f6454a4ac2..9172f14bfb76f 100644
--- a/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml
+++ b/Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml
@@ -49,6 +49,26 @@ properties:
having to list out every possible value in the brightness-level array.
$ref: /schemas/types.yaml#/definitions/uint32

+ pwm-enable-guard-period-us:
+ description: >
+ Duration in microseconds for which the PWM consumer requests
+ full duty (duty_cycle == period) before applying the requested
+ brightness. The guard is issued if the previous PWM state was
+ disabled or had zero duty cycle, e.g. after power-up or resume.
+
+ This can allow LED drivers with startup mode detection to settle
+ before normal PWM dimming begins. For example, TI TPS61160/61
+ distinguish PWM dimming from EasyScale by the duration of low
+ intervals on CTRL during an initial detection window. The guard
+ duration must cover that window according to the LED driver
+ datasheet.
+
+ The PWM provider may approximate full duty if the hardware
+ cannot represent it exactly. The board must ensure that the
+ resulting waveform meets the LED driver startup requirements
+ and that the input has a defined inactive state while off.
+ default: 0
+
dependencies:
default-brightness-level: [brightness-levels]
num-interpolated-steps: [brightness-levels]
--
2.56.0