| 1 |
.. SPDX-License-Identifier: GPL-2.0 |
| 2 |
|
| 3 |
======================== |
| 4 |
Kernel driver for lp5812 |
| 5 |
======================== |
| 6 |
|
| 7 |
* TI/National Semiconductor LP5812 LED Driver |
| 8 |
* Datasheet: https://www.ti.com/product/LP5812#tech-docs |
| 9 |
|
| 10 |
Authors: Jared Zhou <[email protected]> |
| 11 |
|
| 12 |
Description |
| 13 |
=========== |
| 14 |
|
| 15 |
The LP5812 is a 4x3 matrix LED driver with support for both manual and |
| 16 |
autonomous animation control. This driver provides sysfs interfaces to |
| 17 |
control and configure the LP5812 device and its LED channels. |
| 18 |
|
| 19 |
Sysfs Interface |
| 20 |
=============== |
| 21 |
|
| 22 |
This driver uses the standard multicolor LED class interfaces defined |
| 23 |
in Documentation/ABI/testing/sysfs-class-led-multicolor.rst. |
| 24 |
|
| 25 |
Each LP5812 LED output appears under ``/sys/class/leds/`` with its |
| 26 |
assigned label (for example ``LED_A``). |
| 27 |
|
| 28 |
The following attributes are exposed: |
| 29 |
- multi_intensity: Per-channel RGB intensity control |
| 30 |
- brightness: Standard brightness control (0-255) |
| 31 |
|
| 32 |
Autonomous Control Modes |
| 33 |
======================== |
| 34 |
|
| 35 |
The driver also supports autonomous control through pattern configuration |
| 36 |
(e.g., direct, tcmscan, or mixscan modes) defined in the device tree. |
| 37 |
When configured, the LP5812 can generate transitions and color effects |
| 38 |
without CPU intervention. |
| 39 |
|
| 40 |
Refer to the device tree binding document for valid mode strings and |
| 41 |
configuration examples. |
| 42 |
|
| 43 |
Example Usage |
| 44 |
============= |
| 45 |
|
| 46 |
To control LED_A:: |
| 47 |
# Set RGB intensity (R=50, G=50, B=50) |
| 48 |
echo 50 50 50 > /sys/class/leds/LED_A/multi_intensity |
| 49 |
# Set overall brightness to maximum |
| 50 |
echo 255 > /sys/class/leds/LED_A/brightness |