The driver provides sysfs interfaces to control and configure the
LP5812 device and its LED channels.
The documetation describes the chip's capabilities, sysfs interface,
and usage examples.
Signed-off-by: Nam Tran <trannamatk@gmail.com>
---
Documentation/leds/index.rst | 1 +
Documentation/leds/leds-lp5812.rst | 50 ++++++++++++++++++++++++++++++
MAINTAINERS | 1 +
3 files changed, 52 insertions(+)
create mode 100644 Documentation/leds/leds-lp5812.rst
diff --git a/Documentation/leds/index.rst b/Documentation/leds/index.rst
index 76fae171039c..bebf44004278 100644
--- a/Documentation/leds/index.rst
+++ b/Documentation/leds/index.rst
@@ -25,6 +25,7 @@ LEDs
leds-lp5523
leds-lp5562
leds-lp55xx
+ leds-lp5812
leds-mlxcpld
leds-mt6370-rgb
leds-sc27xx
diff --git a/Documentation/leds/leds-lp5812.rst b/Documentation/leds/leds-lp5812.rst
new file mode 100644
index 000000000000..4c22d9a79d14
--- /dev/null
+++ b/Documentation/leds/leds-lp5812.rst
@@ -0,0 +1,50 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+========================
+Kernel driver for lp5812
+========================
+
+* TI/National Semiconductor LP5812 LED Driver
+* Datasheet: https://www.ti.com/product/LP5812#tech-docs
+
+Authors: Jared Zhou <jared-zhou@ti.com>
+
+Description
+===========
+
+The LP5812 is a 4x3 matrix LED driver with support for both manual and
+autonomous animation control. This driver provides sysfs interfaces to
+control and configure the LP5812 device and its LED channels.
+
+Sysfs Interface
+===============
+
+This driver uses the standard multicolor LED class interfaces defined
+in `Documentation/ABI/testing/sysfs-class-led-multicolor`.
+
+Each LP5812 LED output appears under ``/sys/class/leds/`` with its
+assigned label (for example ``LED_A``).
+
+The following attributes are exposed:
+ - multi_intensity: Per-channel RGB intensity control.
+ - brightness: Standard brightness control (0-255)
+
+Autonomous Control Modes
+========================
+
+The driver also supports autonomous control through pattern configuration
+(e.g., direct, tcmscan, or mixscan modes) defined in the device tree.
+When configured, the LP5812 can generate transitions and color effects
+without CPU intervention.
+
+Refer to the device tree binding document for valid mode strings and
+configuration examples.
+
+Example Usage
+=============
+
+To control LED_A::
+ # Set RGB intensity (R=50, G=50, B=50)
+ echo 50 50 50 > /sys/class/leds/LED_A/multi_intensity
+ # Set overall brightness to maximum
+ echo 255 > /sys/class/leds/LED_A/brightness
diff --git a/MAINTAINERS b/MAINTAINERS
index 9a7ae1794328..f696e2299a43 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -25453,6 +25453,7 @@ M: Nam Tran <trannamatk@gmail.com>
L: linux-leds@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/leds/ti,lp5812.yaml
+F: Documentation/leds/leds-lp5812.rst
F: drivers/leds/rgb/Kconfig
F: drivers/leds/rgb/Makefile
F: drivers/leds/rgb/leds-lp5812.c
--
2.25.1
Hi, On 11/23/25 11:10 AM, Nam Tran wrote: > The driver provides sysfs interfaces to control and configure the > LP5812 device and its LED channels. > > The documetation describes the chip's capabilities, sysfs interface, > and usage examples. > > Signed-off-by: Nam Tran <trannamatk@gmail.com> > --- > Documentation/leds/index.rst | 1 + > Documentation/leds/leds-lp5812.rst | 50 ++++++++++++++++++++++++++++++ > MAINTAINERS | 1 + > 3 files changed, 52 insertions(+) > create mode 100644 Documentation/leds/leds-lp5812.rst > > diff --git a/Documentation/leds/leds-lp5812.rst b/Documentation/leds/leds-lp5812.rst > new file mode 100644 > index 000000000000..4c22d9a79d14 > --- /dev/null > +++ b/Documentation/leds/leds-lp5812.rst > @@ -0,0 +1,50 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +======================== > +Kernel driver for lp5812 > +======================== > + > +* TI/National Semiconductor LP5812 LED Driver > +* Datasheet: https://www.ti.com/product/LP5812#tech-docs > + > +Authors: Jared Zhou <jared-zhou@ti.com> > + > +Description > +=========== > + > +The LP5812 is a 4x3 matrix LED driver with support for both manual and > +autonomous animation control. This driver provides sysfs interfaces to > +control and configure the LP5812 device and its LED channels. > + > +Sysfs Interface > +=============== > + > +This driver uses the standard multicolor LED class interfaces defined > +in `Documentation/ABI/testing/sysfs-class-led-multicolor`. If you will remove the ` quote marks and add .rst to the filename, the kdoc system will create a link to that other document. This is the preferred method. > + > +Each LP5812 LED output appears under ``/sys/class/leds/`` with its > +assigned label (for example ``LED_A``). > + > +The following attributes are exposed: > + - multi_intensity: Per-channel RGB intensity control. > + - brightness: Standard brightness control (0-255) The 2 lines above should both end with '.' or not end with '.' (be consistent). They are not sentences so IMO no ending '.' is needed. -- ~Randy
© 2016 - 2025 Red Hat, Inc.