Skip to content

Commit

Permalink
Documentation: move oneshot trigger attributes documentation to ABI
Browse files Browse the repository at this point in the history
Documentation of sysfs interface should be in ABI in the first place.
This moves relevant part of documentation and mentions where to look for
it.
Fix trivial typos whilst we are at it.

Signed-off-by: Rafał Miłecki <[email protected]>
Signed-off-by: Jacek Anaszewski <[email protected]>
  • Loading branch information
Rafał Miłecki authored and janaszewski committed Aug 29, 2016
1 parent 1d1a77d commit 1f70cb4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 19 deletions.
3 changes: 2 additions & 1 deletion Documentation/ABI/testing/sysfs-class-led
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Description:
of led events.
You can change triggers in a similar manner to the way an IO
scheduler is chosen. Trigger specific parameters can appear in
/sys/class/leds/<led> once a given trigger is selected.
/sys/class/leds/<led> once a given trigger is selected. For
their documentation see sysfs-class-led-trigger-*.

What: /sys/class/leds/<led>/inverted
Date: January 2011
Expand Down
36 changes: 36 additions & 0 deletions Documentation/ABI/testing/sysfs-class-led-trigger-oneshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
What: /sys/class/leds/<led>/delay_on
Date: Jun 2012
KernelVersion: 3.6
Contact: [email protected]
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: [email protected]
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: [email protected]
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
Contact: [email protected]
Description:
Write any non-empty string to signal an events, this starts a
blink sequence if not already running.
20 changes: 2 additions & 18 deletions Documentation/leds/ledtrig-oneshot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,8 @@ below:

echo oneshot > trigger

This adds the following sysfs attributes to the LED:

delay_on - specifies for how many milliseconds the LED has to stay at
LED_FULL brightness after it has been armed.
Default to 100 ms.

delay_off - specifies for how many milliseconds the LED has to stay at
LED_OFF brightness after it has been armed.
Default to 100 ms.

invert - 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 change the LED state.

shot - write any non-empty string to signal an events, this starts a blink
sequence if not already running.
This adds sysfs attributes to the LED that are documented in:
Documentation/ABI/testing/sysfs-class-led-trigger-oneshot

Example use-case: network devices, initialization:

Expand Down

0 comments on commit 1f70cb4

Please sign in to comment.