Skip to content

Commit 132e668

Browse files
vicgal-remtechlag-linaro
authored andcommitted
Documentation:leds: Add leds-st1202.rst
Add usage for sysfs hw_pattern entry for leds-st1202 Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Link: https://lore.kernel.org/r/20241218183401.41687-2-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 29df702 commit 132e668

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

Documentation/leds/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ LEDs
2828
leds-mlxcpld
2929
leds-mt6370-rgb
3030
leds-sc27xx
31+
leds-st1202.rst
3132
leds-qcom-lpg

Documentation/leds/leds-st1202.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
============================================
4+
Kernel driver for STMicroelectronics LED1202
5+
============================================
6+
7+
/sys/class/leds/<led>/hw_pattern
8+
--------------------------------
9+
10+
Specify a hardware pattern for the ST1202 LED. The LED controller
11+
implements 12 low-side current generators with independent dimming
12+
control. Internal volatile memory allows the user to store up to 8
13+
different patterns. Each pattern is a particular output configuration
14+
in terms of PWM duty-cycle and duration (ms).
15+
16+
To be compatible with the hardware pattern format, maximum 8 tuples of
17+
brightness (PWM) and duration must be written to hw_pattern.
18+
19+
- Min pattern duration: 22 ms
20+
- Max pattern duration: 5660 ms
21+
22+
The format of the hardware pattern values should be:
23+
"brightness duration brightness duration ..."
24+
25+
/sys/class/leds/<led>/repeat
26+
----------------------------
27+
28+
Specify a pattern repeat number, which is common for all channels.
29+
Default is 1; negative numbers and 0 are invalid.
30+
31+
This file will always return the originally written repeat number.
32+
33+
When the 255 value is written to it, all patterns will repeat
34+
indefinitely.

0 commit comments

Comments
 (0)