| 1 | |
| 2 |
|
| 3 | ======================================
|
| 4 | Samsung S2M Series PMIC RGB LED Driver
|
| 5 | ======================================
|
| 6 |
|
| 7 | Description
|
| 8 | -----------
|
| 9 |
|
| 10 | The RGB LED on the S2M series PMIC hardware features a three-channel LED that
|
| 11 | is grouped together as a single device. Furthermore, it supports 8-bit
|
| 12 | brightness control for each channel. This LED is typically used as a status
|
| 13 | indicator in mobile devices. It also supports various parameters for hardware
|
| 14 | patterns.
|
| 15 |
|
| 16 | The hardware pattern can be programmed using the "pattern" trigger, using the
|
| 17 | hw_pattern attribute.
|
| 18 |
|
| 19 | /sys/class/leds/<led>/repeat
|
| 20 | ----------------------------
|
| 21 |
|
| 22 | The hardware supports only indefinitely repeating patterns. The repeat
|
| 23 | attribute must be set to -1 for hardware patterns to function.
|
| 24 |
|
| 25 | /sys/class/leds/<led>/hw_pattern
|
| 26 | --------------------------------
|
| 27 |
|
| 28 | Specify a hardware pattern for the RGB LEDs.
|
| 29 |
|
| 30 | The pattern is a series of brightness levels and durations in milliseconds.
|
| 31 | There should be only one non-zero brightness level. Unlike the results
|
| 32 | described in leds-trigger-pattern, the transitions between on and off states
|
| 33 | are smoothed out by the hardware.
|
| 34 |
|
| 35 | Simple 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 |
|
| 47 | As described in leds-trigger-pattern, it is also possible to use zero-length
|
| 48 | entries to disable the ramping mechanism.
|
| 49 |
|
| 50 | On-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
|