mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manuel Fombuena <fombuena@outlook.com>
To: lee@kernel.org, pavel@kernel.org,
	vicentiu.galanopulo@remote-tech.co.uk,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 10/10] leds: st1202: correct and extend hw_pattern documentation
Date: Sat, 16 May 2026 15:42:10 +0100	[thread overview]
Message-ID: <WA0P291MB03850ECE39A2FD2CC2EC365DC5052@WA0P291MB0385.POLP291.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <WA0P291MB03850F4E9B4EC7389FE89779C5052@WA0P291MB0385.POLP291.PROD.OUTLOOK.COM>

Fix the repeat section: -1 is a valid value meaning infinite repeat,
as accepted by the ledtrig-pattern sysfs interface; only 0 and values
below -1 are rejected. The previous text incorrectly stated all negative
numbers were invalid. Also remove the redundant trailing sentence since
the behaviour is now covered inline.

Add the brightness range (0-255) to the hw_pattern section, which was
previously undocumented.

Fixes: b1816b22381b (Documentation:leds: Add leds-st1202.rst)
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: Claude:claude-sonnet-4-6
---
 Documentation/leds/leds-st1202.rst | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Documentation/leds/leds-st1202.rst b/Documentation/leds/leds-st1202.rst
index a2353549469e..ed32eb3a27d4 100644
--- a/Documentation/leds/leds-st1202.rst
+++ b/Documentation/leds/leds-st1202.rst
@@ -16,6 +16,7 @@ in terms of PWM duty-cycle and duration (ms).
 To be compatible with the hardware pattern format, maximum 8 tuples of
 brightness (PWM) and duration must be written to hw_pattern.
 
+- Brightness range: 0-255
 - Min pattern duration: 22 ms
 - Max pattern duration: 5610 ms
 
@@ -26,9 +27,7 @@ The format of the hardware pattern values should be:
 ----------------------------
 
 Specify a pattern repeat number, which is common for all channels.
-Default is 1; negative numbers and 0 are invalid.
+Default is 1. Writing 0 is invalid. Writing -1 or 255 repeats the
+pattern indefinitely.
 
 This file will always return the originally written repeat number.
-
-When the 255 value is written to it, all patterns will repeat
-indefinitely.
-- 
2.54.0


      parent reply	other threads:[~2026-05-16 14:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-16 14:25 [PATCH 00/10] leds: st1202: fix multiple bugs in pattern engine and brightness handling Manuel Fombuena
2026-05-16 14:30 ` [PATCH 01/10] leds: st1202: stop pattern sequence before reprogramming Manuel Fombuena
2026-05-16 14:32 ` [PATCH 02/10] leds: st1202: validate pattern input before stopping the sequence Manuel Fombuena
2026-05-16 14:33 ` [PATCH 03/10] leds: st1202: fix pattern duration register calculation Manuel Fombuena
2026-05-16 14:34 ` [PATCH 04/10] leds: st1202: fix pattern_clear to explicitly mark unused slots as skip Manuel Fombuena
2026-05-16 14:34 ` [PATCH 05/10] leds: st1202: reset PAT_REP to POR default in pattern_clear Manuel Fombuena
2026-05-16 14:35 ` [PATCH 06/10] leds: st1202: restore Pattern0 PWM to full on after clearing pattern Manuel Fombuena
2026-05-16 14:36 ` [PATCH 07/10] leds: st1202: fix spurious pattern sequence start in setup Manuel Fombuena
2026-05-16 14:39 ` [PATCH 08/10] leds: st1202: fix brightness having no effect while pattern mode is active Manuel Fombuena
2026-05-16 14:40 ` [PATCH 09/10] leds: st1202: disable channel when brightness is set to zero Manuel Fombuena
2026-05-16 14:42 ` Manuel Fombuena [this message]

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=WA0P291MB03850ECE39A2FD2CC2EC365DC5052@WA0P291MB0385.POLP291.PROD.OUTLOOK.COM \
    --to=fombuena@outlook.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=vicentiu.galanopulo@remote-tech.co.uk \
    /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®