Skip to content

Commit 444bb79

Browse files
nam-hustlag-linaro
authored andcommitted
docs: leds: Document TI LP5812 LED driver
The driver provides sysfs interfaces to control and configure the LP5812 device and its LED channels. The documentation describes the chip's capabilities, sysfs interface, and usage examples. Signed-off-by: Nam Tran <trannamatk@gmail.com> Link: https://patch.msgid.link/20260115161013.40706-3-trannamatk@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
1 parent a0309dc commit 444bb79

3 files changed

Lines changed: 52 additions & 0 deletions

File tree

Documentation/leds/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ LEDs
2525
leds-lp5523
2626
leds-lp5562
2727
leds-lp55xx
28+
leds-lp5812
2829
leds-mlxcpld
2930
leds-mt6370-rgb
3031
leds-sc27xx

Documentation/leds/leds-lp5812.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 <jared-zhou@ti.com>
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

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25841,6 +25841,7 @@ M: Nam Tran <trannamatk@gmail.com>
2584125841
L: linux-leds@vger.kernel.org
2584225842
S: Maintained
2584325843
F: Documentation/devicetree/bindings/leds/ti,lp5812.yaml
25844+
F: Documentation/leds/leds-lp5812.rst
2584425845
F: drivers/leds/rgb/Kconfig
2584525846
F: drivers/leds/rgb/Makefile
2584625847
F: drivers/leds/rgb/leds-lp5812.c

0 commit comments

Comments
 (0)