diff options
| author | Kaustabh Chakraborty <kauschluss@disroot.org> | 2026-05-16 00:38:40 +0300 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-06-17 13:29:34 +0300 |
| commit | 373777fb56ab4db8a2a45cb14985550e888043eb (patch) | |
| tree | 3560dacf7fdb1fef6e2d3d095cef74fb86d97775 | |
| parent | 63ccd117f4257c66d66bc4a49f2d7199adaefa66 (diff) | |
| download | linux-373777fb56ab4db8a2a45cb14985550e888043eb.tar.xz | |
Documentation: leds: Document pattern behavior of Samsung S2M series PMIC RGB LEDs
Add documentation to describe how hardware patterns (as defined by the
documentation of leds-trigger-pattern) are parsed and implemented by the
Samsung S2M series PMIC RGB LED driver.
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Link: https://patch.msgid.link/20260516-s2mu005-pmic-v7-8-73f9702fb461@disroot.org
Signed-off-by: Lee Jones <lee@kernel.org>
| -rw-r--r-- | Documentation/leds/index.rst | 1 | ||||
| -rw-r--r-- | Documentation/leds/leds-s2m-rgb.rst | 60 |
2 files changed, 61 insertions, 0 deletions
diff --git a/Documentation/leds/index.rst b/Documentation/leds/index.rst index bebf44004278..23fa9ff7aaf4 100644 --- a/Documentation/leds/index.rst +++ b/Documentation/leds/index.rst @@ -28,6 +28,7 @@ LEDs leds-lp5812 leds-mlxcpld leds-mt6370-rgb + leds-s2m-rgb leds-sc27xx leds-st1202 leds-qcom-lpg diff --git a/Documentation/leds/leds-s2m-rgb.rst b/Documentation/leds/leds-s2m-rgb.rst new file mode 100644 index 000000000000..4f89a8c89ea8 --- /dev/null +++ b/Documentation/leds/leds-s2m-rgb.rst @@ -0,0 +1,60 @@ +.. SPDX-License-Identifier: GPL-2.0 + +====================================== +Samsung S2M Series PMIC RGB LED Driver +====================================== + +Description +----------- + +The RGB LED on the S2M series PMIC hardware features a three-channel LED that +is grouped together as a single device. Furthermore, it supports 8-bit +brightness control for each channel. This LED is typically used as a status +indicator in mobile devices. It also supports various parameters for hardware +patterns. + +The hardware pattern can be programmed using the "pattern" trigger, using the +hw_pattern attribute. + +/sys/class/leds/<led>/repeat +---------------------------- + +The hardware supports only indefinitely repeating patterns. The repeat +attribute must be set to -1 for hardware patterns to function. + +/sys/class/leds/<led>/hw_pattern +-------------------------------- + +Specify a hardware pattern for the RGB LEDs. + +The pattern is a series of brightness levels and durations in milliseconds. +There should be only one non-zero brightness level. Unlike the results +described in leds-trigger-pattern, the transitions between on and off states +are smoothed out by the hardware. + +Simple pattern:: + + "255 3000 0 1000" + + 255 -+ ''''''-. .-'''''''-. + | '. .' '. + | \ / \ + | '. .' '. + | '-.......-' '- + 0 -+-------+-------+-------+-------+-------+-------+--> time (s) + 0 1 2 3 4 5 6 + +As described in leds-trigger-pattern, it is also possible to use zero-length +entries to disable the ramping mechanism. + +On-Off pattern:: + + "255 1000 255 0 0 1000 0 0" + + 255 -+ ------+ +-------+ +-------+ + | | | | | | + | | | | | | + | | | | | | + | +-------+ +-------+ +------- + 0 -+-------+-------+-------+-------+-------+-------+--> time (s) + 0 1 2 3 4 5 6 |
