projects/linux·blob master · refs

60 lines · 2.1 KiB

1.. SPDX-License-Identifier: GPL-2.0
2
3======================================
4Samsung S2M Series PMIC RGB LED Driver
5======================================
6
7Description
8-----------
9
10The RGB LED on the S2M series PMIC hardware features a three-channel LED that
11is grouped together as a single device. Furthermore, it supports 8-bit
12brightness control for each channel. This LED is typically used as a status
13indicator in mobile devices. It also supports various parameters for hardware
14patterns.
15
16The hardware pattern can be programmed using the "pattern" trigger, using the
17hw_pattern attribute.
18
19/sys/class/leds/<led>/repeat
20----------------------------
21
22The hardware supports only indefinitely repeating patterns. The repeat
23attribute must be set to -1 for hardware patterns to function.
24
25/sys/class/leds/<led>/hw_pattern
26--------------------------------
27
28Specify a hardware pattern for the RGB LEDs.
29
30The pattern is a series of brightness levels and durations in milliseconds.
31There should be only one non-zero brightness level. Unlike the results
32described in leds-trigger-pattern, the transitions between on and off states
33are smoothed out by the hardware.
34
35Simple pattern::
36
37 "255 3000 0 1000"
38
39 255 -+ ''''''-. .-'''''''-.
40 | '. .' '.
41 | \ / \
42 | '. .' '.
43 | '-.......-' '-
44 0 -+-------+-------+-------+-------+-------+-------+--> time (s)
45 0 1 2 3 4 5 6
46
47As described in leds-trigger-pattern, it is also possible to use zero-length
48entries to disable the ramping mechanism.
49
50On-Off pattern::
51
52 "255 1000 255 0 0 1000 0 0"
53
54 255 -+ ------+ +-------+ +-------+
55 | | | | | |
56 | | | | | |
57 | | | | | |
58 | +-------+ +-------+ +-------
59 0 -+-------+-------+-------+-------+-------+-------+--> time (s)
60 0 1 2 3 4 5 6