Documentation/leds/leds-s2m-rgb.rst
Source file repositories/reference/linux-study-clean/Documentation/leds/leds-s2m-rgb.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/leds/leds-s2m-rgb.rst- Extension
.rst- Size
- 2173 bytes
- Lines
- 61
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. 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
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.