From: Wayne Ho via B4 Relay <devnull+wayneho219.gmail.com@kernel.org>
To: Pavel Machek <pavel@kernel.org>, Lee Jones <lee@kernel.org>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] Documentation: ABI: leds: document timer, heartbeat and activity attributes
Date: Thu, 01 Oct 2026 14:45:12 +0800 [thread overview]
Message-ID: <20261001-docs-leds-abi-trigger-attrs-v1-2-54f0529bf0f6@gmail.com> (raw)
In-Reply-To: <20261001-docs-leds-abi-trigger-attrs-v1-0-54f0529bf0f6@gmail.com>
From: Wayne Ho <wayneho219@gmail.com>
The delay_on and delay_off attributes created by the timer trigger and
the invert attribute created by the heartbeat and activity triggers
are not documented. They share their sysfs paths with the oneshot
trigger attributes, so adding a separate entry per trigger would make
get_abi.py warn about the same path being defined more than once.
Move the delay_on, delay_off and invert entries from
sysfs-class-led-trigger-oneshot to sysfs-class-led and describe the
behaviour of each trigger that creates them.
Signed-off-by: Wayne Ho <wayneho219@gmail.com>
---
Documentation/ABI/testing/sysfs-class-led | 68 ++++++++++++++++++++++
.../ABI/testing/sysfs-class-led-trigger-oneshot | 29 ---------
2 files changed, 68 insertions(+), 29 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-class-led b/Documentation/ABI/testing/sysfs-class-led
index c72cb1e0..f438fb83 100644
--- a/Documentation/ABI/testing/sysfs-class-led
+++ b/Documentation/ABI/testing/sysfs-class-led
@@ -86,3 +86,71 @@ Description:
Invert the LED on/off state. This parameter is specific to
the backlight trigger. It is useful when driving a LED which
is intended to indicate a device in a standby like state.
+
+What: /sys/class/leds/<led>/delay_on
+Date: March 2006
+KernelVersion: 2.6.17
+Contact: linux-leds@vger.kernel.org
+Description:
+ This attribute is only present when the LED's trigger is
+ set to "timer" or "oneshot".
+
+ For the "timer" trigger, specifies for how many milliseconds
+ the LED has to stay on in each cycle of a repeating on/off
+ blink. Writing a new value restarts the blink immediately.
+ Defaults to 500 ms.
+
+ For the "oneshot" trigger, specifies for how many
+ milliseconds the LED has to stay at LED_FULL brightness
+ after it has been armed. Defaults to 100 ms.
+
+What: /sys/class/leds/<led>/delay_off
+Date: March 2006
+KernelVersion: 2.6.17
+Contact: linux-leds@vger.kernel.org
+Description:
+ This attribute is only present when the LED's trigger is
+ set to "timer" or "oneshot".
+
+ For the "timer" trigger, specifies for how many milliseconds
+ the LED has to stay off in each cycle of a repeating on/off
+ blink. Writing a new value restarts the blink immediately.
+ Defaults to 500 ms; together with the default delay_on this
+ gives a 1 Hz blink.
+
+ For the "oneshot" trigger, specifies for how many
+ milliseconds the LED has to stay at LED_OFF brightness
+ after it has been armed. Defaults to 100 ms.
+
+What: /sys/class/leds/<led>/invert
+Date: Jun 2012
+KernelVersion: 3.6
+Contact: linux-leds@vger.kernel.org
+Description:
+ This attribute is only present when the LED's trigger is
+ set to "oneshot", "heartbeat" or "activity". Any non-zero
+ value written is stored as 1, so reading it back returns
+ 0 or 1.
+
+ For the "oneshot" trigger, reverses the blink logic. If set
+ to 0 (default) blink on for delay_on ms, then blink off for
+ delay_off ms, leaving the LED normally off. If set to 1,
+ blink off for delay_off ms, then blink on for delay_on ms,
+ leaving the LED normally on. Setting this value also
+ immediately changes the LED state.
+
+ For the "heartbeat" trigger, inverts the heartbeat pattern.
+ If set to 0 (default) the LED stays off most of the time and
+ blinks briefly on. If set to 1 the LED stays on most of the
+ time and blinks briefly off. Unlike "oneshot", the new value
+ only takes effect at the next phase of the pattern.
+
+ For the "activity" trigger, inverts the on/off states of the
+ CPU activity blink. If set to 0 (default) the LED is mostly
+ off when the system is idle and stays on longer as CPU usage
+ grows. If set to 1 the LED is mostly on when idle and stays
+ off longer as CPU usage grows. The new value only takes
+ effect at the next on/off transition.
+
+ This is unrelated to the /sys/class/leds/<led>/inverted
+ attribute, which is specific to the backlight trigger.
diff --git a/Documentation/ABI/testing/sysfs-class-led-trigger-oneshot b/Documentation/ABI/testing/sysfs-class-led-trigger-oneshot
index 378a3a4d..3532f13d 100644
--- a/Documentation/ABI/testing/sysfs-class-led-trigger-oneshot
+++ b/Documentation/ABI/testing/sysfs-class-led-trigger-oneshot
@@ -1,32 +1,3 @@
-What: /sys/class/leds/<led>/delay_on
-Date: Jun 2012
-KernelVersion: 3.6
-Contact: linux-leds@vger.kernel.org
-Description:
- Specifies for how many milliseconds the LED has to stay at
- LED_FULL brightness after it has been armed.
- Defaults to 100 ms.
-
-What: /sys/class/leds/<led>/delay_off
-Date: Jun 2012
-KernelVersion: 3.6
-Contact: linux-leds@vger.kernel.org
-Description:
- Specifies for how many milliseconds the LED has to stay at
- LED_OFF brightness after it has been armed.
- Defaults to 100 ms.
-
-What: /sys/class/leds/<led>/invert
-Date: Jun 2012
-KernelVersion: 3.6
-Contact: linux-leds@vger.kernel.org
-Description:
- Reverse the blink logic. If set to 0 (default) blink on for
- delay_on ms, then blink off for delay_off ms, leaving the LED
- normally off. If set to 1, blink off for delay_off ms, then
- blink on for delay_on ms, leaving the LED normally on.
- Setting this value also immediately changes the LED state.
-
What: /sys/class/leds/<led>/shot
Date: Jun 2012
KernelVersion: 3.6
--
Git-155)
prev parent reply other threads:[~2026-10-01 6:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 6:45 [PATCH 0/2] Documentation: ABI: leds: document shared trigger attributes Wayne Ho via B4 Relay
2026-10-01 6:45 ` [PATCH 1/2] Documentation: ABI: leds: inverted is specific to the backlight trigger Wayne Ho via B4 Relay
2026-10-05 10:43 ` Griffin Kroah-Hartman
2026-10-05 15:35 ` Wayne Ho
2026-10-01 6:45 ` Wayne Ho via B4 Relay [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=20261001-docs-leds-abi-trigger-attrs-v1-2-54f0529bf0f6@gmail.com \
--to=devnull+wayneho219.gmail.com@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=wayneho219@gmail.com \
/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®