mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Nikolaus Schaller" <hns@goldelico.com>
To: "Linus Walleij" <linus.walleij@linaro.org>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Lee Jones" <lee@kernel.org>,
	"Daniel Thompson" <danielt@kernel.org>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Pavel Machek" <pavel@kernel.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Aaro Koskinen" <aaro.koskinen@iki.fi>,
	"Andreas Kemnade" <andreas@kemnade.info>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Roger Quadros" <rogerq@kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Uwe Kleine-König" <ukleinek@kernel.org>,
	"Helge Deller" <deller@gmx.de>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Peter Ujfalusi" <peter.ujfalusi@gmail.com>,
	"Jarkko Nikula" <jarkko.nikula@bitmer.com>
Cc: Jessica Zhang <jessica.zhang@oss.qualcomm.com>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, linux-sound@vger.kernel.org,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org,
	letux-kernel@openphoenux.org, kernel@pyra-handheld.com,
	"H. Nikolaus Schaller" <hns@goldelico.com>
Subject: [PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard
Date: Tue, 24 Nov 2026 08:25:50 +0100	[thread overview]
Message-ID: <9279d3995ae4f81c19afeaa07b32204f16611ac8.1795505160.git.hns@goldelico.com> (raw)
In-Reply-To: <cover.1795505160.git.hns@goldelico.com>

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@goldelico.com>
---

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


  parent reply	other threads:[~2026-11-24  7:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 02/20] gpio: twl4030: Support " H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 03/20] ASoC: twl4030: Allow APLL rate selection through set_sysclk() H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773 H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 09/20] pwm: twl: Support 64-cycle PWM frame H. Nikolaus Schaller
2026-11-24  7:25 ` H. Nikolaus Schaller [this message]
2026-11-24  7:25 ` [PATCH v2 11/20] backlight: pwm: Support enable guard period H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 12/20] drm/panel: td043mtea1: Attach DT backlight H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 13/20] ARM: dts: omap3pandora: Disable unused DMA channels H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 15/20] ARM: dts: omap3pandora: Enable audio interfaces H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 16/20] ARM: dts: omap3pandora: Describe PCM1773 H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 17/20] ARM: dts: omap3pandora: Describe sound card H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 18/20] ARM: dts: omap3pandora: Switch backlight to PWM H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 19/20] backlight: Remove legacy Pandora driver H. Nikolaus Schaller
2026-11-24  7:26 ` [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks H. Nikolaus Schaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9279d3995ae4f81c19afeaa07b32204f16611ac8.1795505160.git.hns@goldelico.com \
    --to=hns@goldelico.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=airlied@gmail.com \
    --cc=andreas@kemnade.info \
    --cc=brgl@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=danielt@kernel.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jarkko.nikula@bitmer.com \
    --cc=jessica.zhang@oss.qualcomm.com \
    --cc=jingoohan1@gmail.com \
    --cc=kernel@pyra-handheld.com \
    --cc=khilman@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=letux-kernel@openphoenux.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=pavel@kernel.org \
    --cc=perex@perex.cz \
    --cc=peter.ujfalusi@gmail.com \
    --cc=robh@kernel.org \
    --cc=rogerq@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tiwai@suse.com \
    --cc=tony@atomide.com \
    --cc=tzimmermann@suse.de \
    --cc=ukleinek@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®