Skip to contentSkip to conversation

auxdisplay: add support for TI LP5812 4x3 Matrix LED driver

PATCH In review Nam Tran 7 participants 32 messages Apr 27, 2025 – May 13, 2025

Subsystems (4)
lore
Share & tools
lore

Nam Tran

author
#0 lore raw

v8 cover auxdisplay: add support for TI LP5812 4x3 Matrix LED driver

This patch series adds support for the TI/National Semiconductor LP5812 4x3 matrix RGB LED driver. The driver supports features such as autonomous animation and time-cross-multiplexing (TCM) for dynamic LED effects.

---
Changes in v8:
- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Changes in v7:
- Mark chip_leds_map as const.
- Use consistent ret initialization.
- Simplify the function set_mix_sel_led().
- Refactor dev_config_show() and led_auto_animation_show() to avoid temp buffer, malloc/free.
- Simplify the code and ensure consistent use of mutex lock/unlock in show/store functions.
- Remove total_leds and total_aeu.
- Link to v6: https://lore.kernel.org/linux-leds/[email protected]/

Changes in v6:
- Add vcc-supply property to describe the LP5812 power supply.
- Remove chan-name property and entire LED subnodes, as they are not needed.
- Update LP5812 LED driver node to Raspberry Pi 4 B Device Tree, based on updated binding.
- Link to v5: https://lore.kernel.org/linux-leds/[email protected]/

Changes in v5:
- Rebase on v6.15-rc2
- Removed unused functions (lp5812_dump_regs, lp5812_update_bit).
- Address Krzysztof's review comments
- Link to v4: https://lore.kernel.org/linux-leds/[email protected]/
---

Nam Tran (5):
dt-bindings: auxdisplay: add TI LP5812 4×3 Matrix RGB LED Driver
auxdisplay: add TI LP5812 4×3 Matrix RGB LED Driver
docs: ABI: Document LP5812 sysfs interfaces
docs: auxdisplay: document TI LP5812 RGB LED driver
arm64: dts: Add LP5812 node for Raspberry Pi 4 Model B

 .../ABI/testing/sysfs-bus-i2c-devices-lp5812  |  144 +
 .../admin-guide/auxdisplay/index.rst          |    3 +-
 .../admin-guide/auxdisplay/lp5812.rst         |   79 +
 .../bindings/auxdisplay/ti,lp5812.yaml        |   46 +
 MAINTAINERS                                   |   12 +
 .../arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts |   10 +
 drivers/auxdisplay/Kconfig                    |   17 +
 drivers/auxdisplay/Makefile                   |    1 +
 drivers/auxdisplay/lp5812.c                   | 2736 +++++++++++++++++
 drivers/auxdisplay/lp5812.h                   |  348 +++
 10 files changed, 3395 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c-devices-lp5812
 create mode 100644 Documentation/admin-guide/auxdisplay/lp5812.rst
 create mode 100644 Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml
 create mode 100644 drivers/auxdisplay/lp5812.c
 create mode 100644 drivers/auxdisplay/lp5812.h

base-commit: f1a3944c860b0615d0513110d8cf62bb94adbb41

Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v8 1/5 dt-bindings: auxdisplay: add TI LP5812 4×3 Matrix RGB LED Driver

The LP5812 is a 4×3 RGB LED driver with an autonomous animation engine and time-cross-multiplexing (TCM) support for up to 12 LEDs. It supports both analog (256 levels) and PWM (8-bit) dimming, including exponential PWM for smooth brightness control.

---
 .../bindings/auxdisplay/ti,lp5812.yaml        | 46 +++++++++++++++++++
 MAINTAINERS                                   |  6 +++
 2 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml
Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml new file +46 -0
new file mode 100644
index 000000000000..fb94a6336e16
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/auxdisplay/ti,lp5812.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI LP5812 4×3 Matrix RGB LED Driver with Autonomous Control
+
+maintainers:
+  - Nam Tran <[email protected]>
+
+description: |
+  The LP5812 is an I2C LED Driver that can support LED matrix 4x3.
+  For more product information please see the link below:
+  https://www.ti.com/product/LP5812#tech-docs
+
+properties:
+  compatible:
+    const: ti,lp5812
+
+  reg:
+    maxItems: 1
+
+  vcc-supply:
+    description: Regulator providing power to the 'VCC' pin.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        led-controller@1b {
+            compatible = "ti,lp5812";
+            reg = <0x1b>;
+            vcc-supply = <&vdd_3v3_reg>;
+        };
+    };
+
+...
MAINTAINERS +6 -0
index 7940ddd91196..241c5441e239 100644
@@ -24016,6 +24016,12 @@ S:	Supported
 F:	Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml
 F:	drivers/iio/dac/ti-dac7612.c
 
+TEXAS INSTRUMENTS' LP5812 4X3 MATRIX LED DRIVER
+M:	Nam Tran <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml
+
 TEXAS INSTRUMENTS' LB8864 LED BACKLIGHT DRIVER
 M:	Alexander Sverdlin <[email protected]>
 L:	[email protected]
Signature · 1 line
2.25.1
author
#2 lore raw

PATCH v8 2/5 auxdisplay: add TI LP5812 4×3 Matrix RGB LED Driver

In reply to Nam Tran

The LP5812 is a 4×3 matrix RGB LED driver
with an autonomous animation engine
and time-cross-multiplexing (TCM) support for up to 12 LEDs. Each LED can be configured through the related registers to realize vivid and fancy lighting effects.

---
 MAINTAINERS                 |    4 +
 drivers/auxdisplay/Kconfig  |   17 +
 drivers/auxdisplay/Makefile |    1 +
 drivers/auxdisplay/lp5812.c | 2736 +++++++++++++++++++++++++++++++++++
 drivers/auxdisplay/lp5812.h |  348 +++++
 5 files changed, 3106 insertions(+)
 create mode 100644 drivers/auxdisplay/lp5812.c
 create mode 100644 drivers/auxdisplay/lp5812.h
MAINTAINERS +4 -0
index 241c5441e239..091373b01dc2 100644
@@ -24021,6 +24021,10 @@ M:	Nam Tran <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml
+F:	drivers/auxdisplay/Kconfig
+F:	drivers/auxdisplay/Makefile
+F:	drivers/auxdisplay/lp5812.c
+F:	drivers/auxdisplay/lp5812.h
 
 TEXAS INSTRUMENTS' LB8864 LED BACKLIGHT DRIVER
 M:	Alexander Sverdlin <[email protected]>
drivers/auxdisplay/Kconfig +17 -0
index bedc6133f970..896f02b9a06b 100644
@@ -539,6 +539,23 @@ config ARM_CHARLCD
 	  line and the Linux version on the second line, but that's
 	  still useful.
 
+#
+# TI LP5812 matrix RGB LED driver section
+#
+config LP5812
+tristate "Enable LP5812 support LED matrix 4x3"
+depends on I2C
+help
+  If you say Y here you get support for TI LP5812 LED driver.
+
+  The LP5812 is a 4 × 3 matrix RGB LED driver with autonomous
+  animation engine control.
+
+  To compile this driver as a module, choose M here: the
+  module will be called lp5812.
+
+  If unsure, say N.
+
 endif # AUXDISPLAY
 
 #
drivers/auxdisplay/Makefile +1 -0
index f5c13ed1cd4f..36b9bb5cb1cf 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_IMG_ASCII_LCD)	+= img-ascii-lcd.o
 obj-$(CONFIG_KS0108)		+= ks0108.o
 obj-$(CONFIG_LCD2S)		+= lcd2s.o
 obj-$(CONFIG_LINEDISP)		+= line-display.o
+obj-$(CONFIG_LP5812)		+= lp5812.o
 obj-$(CONFIG_MAX6959)		+= max6959.o
 obj-$(CONFIG_PARPORT_PANEL)	+= panel.o
 obj-$(CONFIG_SEG_LED_GPIO)	+= seg-led-gpio.o
drivers/auxdisplay/lp5812.c new file +2736 -0

2,736 lines not on this page · raw message

drivers/auxdisplay/lp5812.h new file +348 -0

224 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.25.1

Part of the diff is not shown here. View the raw message.

reviewer
#3 lore raw

Re: [PATCH v8 2/5] auxdisplay: add TI LP5812 4×3 Matrix RGB LED Driver

Hi--

drivers/auxdisplay/Kconfig config ARM_CHARLCD · line 545

Quoted 12 lines · Nam Tran
drivers/auxdisplay/Kconfig +4 -0
index bedc6133f970..896f02b9a06b 100644
@@ -539,6 +539,23 @@ config ARM_CHARLCD
 	  line and the Linux version on the second line, but that's
 	  still useful.
 
+#
+# TI LP5812 matrix RGB LED driver section
+#
+config LP5812

Missing one tab of indentation on all lines below here:

Quoted 14 lines
drivers/auxdisplay/Kconfig +13 -0
+tristate "Enable LP5812 support LED matrix 4x3"
+depends on I2C
+help
+  If you say Y here you get support for TI LP5812 LED driver.
+
+  The LP5812 is a 4 × 3 matrix RGB LED driver with autonomous
+  animation engine control.
+
+  To compile this driver as a module, choose M here: the
+  module will be called lp5812.
+
+  If unsure, say N.
+
 endif # AUXDISPLAY
Signature · 1 line
~Randy
author
#4 lore raw

Re: [PATCH v8 2/5] auxdisplay: add TI LP5812 4×3 Matrix RGB LED Driver

Quoted 18 lines · On Sun, 27 Apr 2025 Randy Dunlap wrote:

Hi--

drivers/auxdisplay/Kconfig config ARM_CHARLCD · line 545

Quoted 12 lines · Nam Tran
drivers/auxdisplay/Kconfig +4 -0
index bedc6133f970..896f02b9a06b 100644
@@ -539,6 +539,23 @@ config ARM_CHARLCD
 	  line and the Linux version on the second line, but that's
 	  still useful.
 
+#
+# TI LP5812 matrix RGB LED driver section
+#
+config LP5812

Missing one tab of indentation on all lines below here:

Quoted 14 lines
Quoted 4 lines
drivers/auxdisplay/Kconfig +4 -0
+tristate "Enable LP5812 support LED matrix 4x3"
+depends on I2C
+help
+  If you say Y here you get support for TI LP5812 LED driver.

drivers/auxdisplay/Kconfig config ARM_CHARLCD · line 559

Quoted 10 lines
drivers/auxdisplay/Kconfig +9 -0
+
+  The LP5812 is a 4 × 3 matrix RGB LED driver with autonomous
+  animation engine control.
+
+  To compile this driver as a module, choose M here: the
+  module will be called lp5812.
+
+  If unsure, say N.
+
 endif # AUXDISPLAY

Thank you for pointing that out.
It was my mistake, and I’ll correct it.

Best regards,
Nam Tran

author
#5 lore raw

PATCH v8 3/5 docs: ABI: Document LP5812 sysfs interfaces

In reply to Nam Tran

The LP5812 is a 4 × 3 matrix RGB LED driver
with autonomous animation engine control.

The driver provides interfaces to configure
LED modes manual/autonomous, set PWM/DC values,
and manage autonomous animation engines.

---
 .../ABI/testing/sysfs-bus-i2c-devices-lp5812  | 144 ++++++++++++++++++
 MAINTAINERS                                   |   1 +
 2 files changed, 145 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-i2c-devices-lp5812
Documentation/ABI/testing/sysfs-bus-i2c-devices-lp5812 new file +144 -0
new file mode 100644
index 000000000000..04689663a643
@@ -0,0 +1,144 @@
+What:		/sys/bus/i2c/devices/.../lp5812_chip_setup/device_enable
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Enables or disables the LP5812 device. (RW)
+        0 - Disable
+        1 - Enable
+
+What:		/sys/bus/i2c/devices/.../lp5812_chip_setup/dev_config
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Configures drive mode and scan order. (RW)
+        Some valid values: tcmscan:4:0:1:2:3 (default), tcmscan:3:0:1:2, mixscan:2:2:0:3, mixscan:3:0:1:2:3
+
+What:		/sys/bus/i2c/devices/.../lp5812_chip_setup/device_command
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Issues device-level commands. (WO)
+        Valid values: "update", "start", "stop", "pause", "continue"
+
+What:		/sys/bus/i2c/devices/.../lp5812_chip_setup/sw_reset
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Triggers a software reset of the device. (WO)
+        1 - resets device
+        0 - does not reset device
+
+What:		/sys/bus/i2c/devices/.../lp5812_chip_setup/fault_clear
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Clears fault status. (WO)
+        1 - clears fault status
+        0 - does not clear fault status
+
+What:		/sys/bus/i2c/devices/.../lp5812_chip_setup/tsd_config_status
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Report the current thermal shutdown config status. (RO)
+
+What:		/sys/bus/i2c/devices/.../led_<id>/activate
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Activate or deactivate the specified LED channel. (RW)
+        1 - Activate
+        0 - Deactivate
+
+What:		/sys/bus/i2c/devices/.../led_<id>/mode
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Selects LED operation mode. (RW)
+        Valid values: "manual", "autonomous"
+
+What:		/sys/bus/i2c/devices/.../led_<id>/manual_dc
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        DC current level in manual mode. (RW)
+        Valid values: 0 - 255
+
+What:		/sys/bus/i2c/devices/.../led_<id>/manual_pwm
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        PWM duty cycle in manual mode. (RW)
+        Valid values: 0 - 255
+
+What:		/sys/bus/i2c/devices/.../led_<id>/autonomous_dc
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        DC current level used in autonomous mode. (RW)
+        Valid values: 0 - 255
+
+What:		/sys/bus/i2c/devices/.../led_<id>/autonomous_dc
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        DC current level used in autonomous mode. (RW)
+        Valid values: 0 - 255
+
+What:		/sys/bus/i2c/devices/.../led_<id>/pwm_dimming_scale
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        PWM dimming scale type. (RW)
+        Valid values: "linear", "exponential"
+
+What:		/sys/bus/i2c/devices/.../led_<id>/pwm_phase_align
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Configures PWM phase alignment. (RW)
+        Valid values: "forward", "middle", "backward"
+
+What:		/sys/bus/i2c/devices/.../led_<id>/autonomous_animation
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Controls AEU configuration and playback. (RW)
+        Format: (aeu number):(start pause time):(stop pause time):(playback time)
+        with aeu number 1, 2, 3; playback time 0 - 15
+
+What:		/sys/bus/i2c/devices/.../led_<id>/aep_status
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Shows current animation pattern status, value from 0 to 7. (RO)
+
+What:		/sys/bus/i2c/devices/.../led_<id>/auto_pwm_val
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        Shows the pwm value in autonomous mode when pause the animation, value from 0 to 255. (RO)
+
+What:		/sys/bus/i2c/devices/.../led_<id>/lod_lsd
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	Nam Tran <[email protected]>
+Description:
+        0 0 mean no lod and lsd fault detected, 1 1 mean lod and lsd fault detected (RO)
MAINTAINERS +1 -0
index 091373b01dc2..5d8ee0801c69 100644
@@ -24020,6 +24020,7 @@ TEXAS INSTRUMENTS' LP5812 4X3 MATRIX LED DRIVER
 M:	Nam Tran <[email protected]>
 L:	[email protected]
 S:	Maintained
+F:	Documentation/ABI/testing/sysfs-bus-i2c-devices-lp5812
 F:	Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml
 F:	drivers/auxdisplay/Kconfig
 F:	drivers/auxdisplay/Makefile
Signature · 1 line
2.25.1
author
#6 lore raw

PATCH v8 4/5 docs: auxdisplay: document TI LP5812 RGB LED driver

In reply to Nam Tran

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.

---
 .../admin-guide/auxdisplay/index.rst          |  3 +-
 .../admin-guide/auxdisplay/lp5812.rst         | 79 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 3 files changed, 82 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/admin-guide/auxdisplay/lp5812.rst
Documentation/admin-guide/auxdisplay/index.rst +2 -1
index e466f0595248..5d627f067c77 100644
@@ -5,8 +5,9 @@ Auxiliary Display Support
 .. toctree::
     :maxdepth: 1
 
-    ks0108.rst
     cfag12864b.rst
+    ks0108.rst
+    lp5812.rst
 
 .. only::  subproject and html
 
Documentation/admin-guide/auxdisplay/lp5812.rst new file +79 -0

79 lines not on this page · raw message

MAINTAINERS +1 -0
index 5d8ee0801c69..dd504dee3274 100644
@@ -24021,6 +24021,7 @@ M:	Nam Tran <[email protected]>
 L:	[email protected]
 S:	Maintained
 F:	Documentation/ABI/testing/sysfs-bus-i2c-devices-lp5812
+F:	Documentation/admin-guide/auxdisplay/lp5812.rst
 F:	Documentation/devicetree/bindings/auxdisplay/ti,lp5812.yaml
 F:	drivers/auxdisplay/Kconfig
 F:	drivers/auxdisplay/Makefile
Signature · 1 line
2.25.1
author
#7 lore raw

PATCH v8 5/5 arm64: dts: Add LP5812 node for Raspberry Pi 4 Model B

In reply to Nam Tran

Add the LP5812 LED driver node to the Device Tree for Raspberry Pi 4 B. This enables the LED connected to the LP5812 to be controlled via I2C.

---
 arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts +10 -0
index 353bb50ce542..2f058cf5d76e 100644
@@ -152,6 +152,16 @@ &hdmi1 {
 	status = "okay";
 };
 
+&i2c1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	led-controller@1b {
+		compatible = "ti,lp5812";
+		reg = <0x1b>;
+	};
+};
+
 &led_act {
 	gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
 };
Signature · 1 line
2.25.1
#8 lore raw
In reply to Nam Tran
Quoted 6 lines · Nam Tran

This patch series adds support for the TI/National Semiconductor LP5812 4x3 matrix RGB LED driver. The driver supports features such as autonomous animation and time-cross-multiplexing (TCM) for dynamic LED effects.

Quoted 9 lines

---
Changes in v8:
- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#9 lore raw

Hi!

Quoted 15 lines
Quoted 5 lines

This patch series adds support for the TI/National Semiconductor LP5812 4x3 matrix RGB LED driver. The driver supports features such as autonomous animation and time-cross-multiplexing (TCM) for dynamic LED effects.

Quoted 9 lines

---
Changes in v8:
- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Quoted 5 lines

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Best regards,
Pavel

Signature · 2 lines
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!
#10 lore raw

Hi Pavel,

Quoted 21 lines · Pavel Machek
Quoted 15 lines
Quoted 5 lines

This patch series adds support for the TI/National Semiconductor LP5812 4x3 matrix RGB LED driver. The driver supports features such as autonomous animation and time-cross-multiplexing (TCM) for dynamic LED effects.

Quoted 9 lines

---
Changes in v8:
- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Quoted 5 lines

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

BTW, my first guess was that you just wanted to avoid the LED maintainers becoming responsible for the extensive sysfs interface ;-)

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
author
#11 lore raw

Hi Geert, Pavel,

Thank you, Pavel, for the confirmation. Thank you, Geert, for the review and the question.

I would like to make it clearer.

Quoted 24 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:

Hi Pavel,

Quoted 21 lines · Pavel Machek
Quoted 20 lines
Quoted 5 lines

This patch series adds support for the TI/National Semiconductor LP5812 4x3 matrix RGB LED driver. The driver supports features such as autonomous animation and time-cross-multiplexing (TCM) for dynamic LED effects.

Quoted 9 lines

---
Changes in v8:
- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Best regards,
Nam Tran

#12 lore raw

Hi!

Quoted 29 lines

Thank you, Pavel, for the confirmation. Thank you, Geert, for the review and the question.

I would like to make it clearer.

Quoted 14 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 14 lines
Quoted 13 lines
Quoted 7 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

Best regards,
Pavel

Signature · 2 lines
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!
author
#13 lore raw
Quoted 39 lines · On Mon, 28 Apr 2025 Pavel Machek wrote:

Hi!

Quoted 29 lines

Thank you, Pavel, for the confirmation. Thank you, Geert, for the review and the question.

I would like to make it clearer.

Quoted 14 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 14 lines
Quoted 13 lines
Quoted 7 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Quoted 6 lines

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

Best regards,
Nam Tran

#14 lore raw
Quoted 36 lines · Nam Tran
Quoted 35 lines · On Mon, 28 Apr 2025 Pavel Machek wrote:
Quoted 23 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 8 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

Quoted 7 lines
Quoted 2 lines

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

I have mixed feelings about all this. As per hardware organisation it sounds more like a matrix (for example. keyboard), where all entities are accessed on a scanline, but at the same time each of the entities may have orthogonal functions to each other. Have you checked with DRM for the sake of completeness?
Personally I lean more to the something special, which doesn't fit existing subsystems. Auxdisplay subsystem more or less about special alphanumeric displays (with the exception of some FB kinda devices, that were even discussed to have drivers be removed). Also maybe FB might have something suitable, but in any case it looks quite non-standard...

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#15 lore raw
Quoted 45 lines · On Tue, 29 Apr 2025 Andy Shevchenko wrote:
Quoted 36 lines · Nam Tran
Quoted 35 lines · On Mon, 28 Apr 2025 Pavel Machek wrote:
Quoted 23 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 8 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

Quoted 7 lines
Quoted 2 lines

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

Quoted 11 lines

I have mixed feelings about all this. As per hardware organisation it sounds more like a matrix (for example. keyboard), where all entities are accessed on a scanline, but at the same time each of the entities may have orthogonal functions to each other. Have you checked with DRM for the sake of completeness?
Personally I lean more to the something special, which doesn't fit existing subsystems. Auxdisplay subsystem more or less about special alphanumeric displays (with the exception of some FB kinda devices, that were even discussed to have drivers be removed). Also maybe FB might have something suitable, but in any case it looks quite non-standard...

I understand your mixed feelings about where the LP5812 fits within the existing subsystems.

While the LP5812 uses a matrix-based structure for controlling LEDs, it is not intended for displaying structured text or graphics. Instead, it controls up to 4 RGB LEDs for status indication, where each RGB LED consists of 3 individual color LEDs: red, green, and blue. Based on this, I think it aligns more closely with the LED subsystem rather than DRM or FB.

Best regards,
Nam Tran

#16 lore raw

First of all, I just noticed that you excluded Lee from the distribution list. Don't do that as he is a stakeholder here as well since it has not been decided yet where to go with your stuff.

Quoted 58 lines · Nam Tran
Quoted 45 lines · On Tue, 29 Apr 2025 Andy Shevchenko wrote:
Quoted 36 lines · Nam Tran
Quoted 35 lines · On Mon, 28 Apr 2025 Pavel Machek wrote:
Quoted 23 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 8 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

Quoted 7 lines
Quoted 2 lines

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

Quoted 11 lines

I have mixed feelings about all this. As per hardware organisation it sounds more like a matrix (for example. keyboard), where all entities are accessed on a scanline, but at the same time each of the entities may have orthogonal functions to each other. Have you checked with DRM for the sake of completeness?
Personally I lean more to the something special, which doesn't fit existing subsystems. Auxdisplay subsystem more or less about special alphanumeric displays (with the exception of some FB kinda devices, that were even discussed to have drivers be removed). Also maybe FB might have something suitable, but in any case it looks quite non-standard...

Quoted 7 lines

I understand your mixed feelings about where the LP5812 fits within the existing subsystems.

While the LP5812 uses a matrix-based structure for controlling LEDs, it is not intended for displaying structured text or graphics. Instead, it controls up to 4 RGB LEDs for status indication, where each RGB LED consists of 3 individual color LEDs: red, green, and blue. Based on this,

So, you probably should have started with this. As I read above that this has to reside in drivers/leds/rgb for colour ones which seems to me closest to your case. On top you might add an upper level management to prevent users from using patterns whenever the LEDs are requested individually. So, this driver should represent 4 RGB leds and, possibly, the upper layer with those fancy stuff like breathing.

At least, based on the above it's my formal NAK from an auxdisplay perspective.

Quoted 1 line

I think it aligns more closely with the LED subsystem rather than DRM or FB.

Right.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#17 lore raw
Quoted 71 lines · Andy Shevchenko

First of all, I just noticed that you excluded Lee from the distribution list. Don't do that as he is a stakeholder here as well since it has not been decided yet where to go with your stuff.

Quoted 58 lines · Nam Tran
Quoted 45 lines · On Tue, 29 Apr 2025 Andy Shevchenko wrote:
Quoted 36 lines · Nam Tran
Quoted 35 lines · On Mon, 28 Apr 2025 Pavel Machek wrote:
Quoted 23 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 8 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

Quoted 7 lines
Quoted 2 lines

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

Quoted 11 lines

I have mixed feelings about all this. As per hardware organisation it sounds more like a matrix (for example. keyboard), where all entities are accessed on a scanline, but at the same time each of the entities may have orthogonal functions to each other. Have you checked with DRM for the sake of completeness?
Personally I lean more to the something special, which doesn't fit existing subsystems. Auxdisplay subsystem more or less about special alphanumeric displays (with the exception of some FB kinda devices, that were even discussed to have drivers be removed). Also maybe FB might have something suitable, but in any case it looks quite non-standard...

Quoted 7 lines

I understand your mixed feelings about where the LP5812 fits within the existing subsystems.

While the LP5812 uses a matrix-based structure for controlling LEDs, it is not intended for displaying structured text or graphics. Instead, it controls up to 4 RGB LEDs for status indication, where each RGB LED consists of 3 individual color LEDs: red, green, and blue. Based on this,

Quoted 8 lines

So, you probably should have started with this. As I read above that this has to reside in drivers/leds/rgb for colour ones which seems to me closest to your case. On top you might add an upper level management to prevent users from using patterns whenever the LEDs are requested individually. So, this driver should represent 4 RGB leds and, possibly, the upper layer with those fancy stuff like breathing.

At least, based on the above it's my formal NAK from an auxdisplay perspective.

This is fine.

Just be aware, before you submit to LEDs again, that you need to use what is available in the LEDs subsystem to it's fullest, before hand-rolling all of your own APIs. The first submission didn't use a single LED API. This, as before, would be a big NACK also.

Signature · 1 line
Lee Jones [李琼斯]
author
#18 lore raw
Quoted 80 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 78 lines · Andy Shevchenko

First of all, I just noticed that you excluded Lee from the distribution list. Don't do that as he is a stakeholder here as well since it has not been decided yet where to go with your stuff.

Quoted 58 lines · Nam Tran
Quoted 45 lines · On Tue, 29 Apr 2025 Andy Shevchenko wrote:
Quoted 36 lines · Nam Tran
Quoted 35 lines · On Mon, 28 Apr 2025 Pavel Machek wrote:
Quoted 23 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 15 lines
Quoted 15 lines
Quoted 14 lines
Quoted 8 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

Quoted 7 lines
Quoted 2 lines

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

Quoted 11 lines

I have mixed feelings about all this. As per hardware organisation it sounds more like a matrix (for example. keyboard), where all entities are accessed on a scanline, but at the same time each of the entities may have orthogonal functions to each other. Have you checked with DRM for the sake of completeness?
Personally I lean more to the something special, which doesn't fit existing subsystems. Auxdisplay subsystem more or less about special alphanumeric displays (with the exception of some FB kinda devices, that were even discussed to have drivers be removed). Also maybe FB might have something suitable, but in any case it looks quite non-standard...

Quoted 7 lines

I understand your mixed feelings about where the LP5812 fits within the existing subsystems.

While the LP5812 uses a matrix-based structure for controlling LEDs, it is not intended for displaying structured text or graphics. Instead, it controls up to 4 RGB LEDs for status indication, where each RGB LED consists of 3 individual color LEDs: red, green, and blue. Based on this,

So, you probably should have started with this. As I read above that this has to reside in drivers/leds/rgb for colour ones which seems to me closest to your case. On top you might add an upper level management to prevent users from using patterns whenever the LEDs are requested individually. So, this driver should represent 4 RGB leds and, possibly, the upper layer with those fancy stuff like breathing.

Quoted 8 lines
Quoted 1 line

At least, based on the above it's my formal NAK from an auxdisplay perspective.

This is fine.

Just be aware, before you submit to LEDs again, that you need to use what is available in the LEDs subsystem to it's fullest, before hand-rolling all of your own APIs. The first submission didn't use a single LED API. This, as before, would be a big NACK also.

Thanks for the clarification.

Just to confirm — the current version of the driver is customized to allow user space to directly manipulate LP5812 registers and to support the device’s full feature set. Because of this, it doesn’t follow the standard LED interfaces.

Given that, would it be acceptable to submit this driver under the misc subsystem instead?

Best regards,
Nam Tran

#19 lore raw
Quoted 3 lines · Nam Tran
Quoted 2 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 1 line · Andy Shevchenko

On Wed, May 7, 2025 at 7:42 PM Nam Tran <[email protected]> wrote:

...

Quoted 9 lines
Quoted 8 lines
Quoted 1 line

At least, based on the above it's my formal NAK from an auxdisplay perspective.

This is fine.

Just be aware, before you submit to LEDs again, that you need to use what is available in the LEDs subsystem to it's fullest, before hand-rolling all of your own APIs. The first submission didn't use a single LED API. This, as before, would be a big NACK also.

Quoted 6 lines

Thanks for the clarification.

Just to confirm — the current version of the driver is customized to allow user space to directly manipulate LP5812 registers and to support the device’s full feature set. Because of this, it doesn’t follow the standard LED interfaces.

But why? What's wrong with the LED ABI? (see also below question before answering to this one)

Quoted 1 line

Given that, would it be acceptable to submit this driver under the misc subsystem instead?

But these are LEDs in the hardware and you can access them as 4 individual LEDs, right?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#20 lore raw
Quoted 23 lines · Andy Shevchenko
Quoted 3 lines · Nam Tran
Quoted 2 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 1 line · Andy Shevchenko

On Wed, May 7, 2025 at 7:42 PM Nam Tran <[email protected]> wrote:

...

Quoted 9 lines
Quoted 8 lines
Quoted 1 line

At least, based on the above it's my formal NAK from an auxdisplay perspective.

This is fine.

Just be aware, before you submit to LEDs again, that you need to use what is available in the LEDs subsystem to it's fullest, before hand-rolling all of your own APIs. The first submission didn't use a single LED API. This, as before, would be a big NACK also.

Quoted 6 lines

Thanks for the clarification.

Just to confirm — the current version of the driver is customized to allow user space to directly manipulate LP5812 registers and to support the device’s full feature set. Because of this, it doesn’t follow the standard LED interfaces.

Quoted 7 lines

But why? What's wrong with the LED ABI? (see also below question before answering to this one)

Quoted 1 line

Given that, would it be acceptable to submit this driver under the misc subsystem instead?

But these are LEDs in the hardware and you can access them as 4 individual LEDs, right?

Right. Please work with the API you are offered in the first instance. My first assumption is always that this driver isn't as special as you think it might be.

Signature · 1 line
Lee Jones [李琼斯]
author
#21 lore raw
Quoted 27 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 26 lines · Andy Shevchenko
Quoted 3 lines · Nam Tran
Quoted 2 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 1 line · Andy Shevchenko

On Wed, May 7, 2025 at 7:42 PM Nam Tran <[email protected]> wrote:

...

Quoted 9 lines
Quoted 8 lines
Quoted 1 line

At least, based on the above it's my formal NAK from an auxdisplay perspective.

This is fine.

Just be aware, before you submit to LEDs again, that you need to use what is available in the LEDs subsystem to it's fullest, before hand-rolling all of your own APIs. The first submission didn't use a single LED API. This, as before, would be a big NACK also.

Quoted 6 lines

Thanks for the clarification.

Just to confirm — the current version of the driver is customized to allow user space to directly manipulate LP5812 registers and to support the device’s full feature set. Because of this, it doesn’t follow the standard LED interfaces.

But why? What's wrong with the LED ABI? (see also below question before answering to this one)

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Given that, would it be acceptable to submit this driver under the misc subsystem instead?

But these are LEDs in the hardware and you can access them as 4 individual LEDs, right?

Right. Please work with the API you are offered in the first instance. My first assumption is always that this driver isn't as special as you think it might be.

In direct mode, we can access them as individual LEDS. User doesn't need to select LEDs. In this mode, it is a simple LED driver.

However, user must select LEDs in scan mode. The hardware uses 4 pin to display 12 LEDs (or 4 RGB LEDs). Ordering of LED selection also impact to display capacibility. That why, I need to support another interface for user to controll hardware's registers.

In mix mode, we can control an individual LED and up to 6 scan LEDs. However, user must select the order of single LED and which LEDs will be use for scan function.

The main point is user must have capacibility in write information to hardware's registers to select LEDs in scan mode and mix mode.

Besides system modes (direct mode, scan mode, mix mode), each LED has manual mode and autonomous mode.

A example steps to display a LED in manual mode
# Set drive mode is Scan mode with 4 scan. Scan order 0 is out_0,
# Scan order 1 is out_1, Scan order 2 is out_2, and Scan order 3 is out_3 echo tcmscan:4:0:1:2:3 > /sys/bus/i2c/drivers/lp5812/1-001b/lp5812_chip_setup/dev_config # Enable led_A0
echo 1 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/activate
# Enable manual mode
echo manual > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/mode
# Set Dot Current
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/manual_dc
# Set Manual PWM
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/manual_pwm

However in autonomous mode, the steps are complicated
# Set drive mode is Scan mode with 4 scan. Scan order 0 is out_0,
# Scan order 1 is out_1, Scan order 2 is out_2, and Scan order 3 is out_3 echo tcmscan:4:0:1:2:3 > /sys/bus/i2c/drivers/lp5812/1-001b/lp5812_chip_setup/dev_config # Enable led_A0
echo 1 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/activate
# Enable autonomous mode
echo autonomous > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/mode
# Config autonomous animation mode: (only use AEU1, start pause time: 3.04s,

# stop pause time: 3.04s, playback time: infinite time)
echo 1:10:10:15 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/mode
# Config AEU1 playback times
echo 1 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/playback_time
# Config PWM
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm1
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm2
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm3
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm4
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm5
# Config slope time
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t1
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t2
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t3
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t4
# Start autonomous
echo start > /sys/bus/i2c/drivers/lp5812/1-001b/lp5812_chip_setup/device_command

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

Best regards,
Nam Tran

maintainer
#22 lore raw
Quoted 6 lines · Nam Tran
Quoted 5 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 4 lines · Andy Shevchenko
Quoted 3 lines · Nam Tran
Quoted 2 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 1 line · Andy Shevchenko

On Wed, May 7, 2025 at 7:42 PM Nam Tran <[email protected]> wrote:

...

Quoted 86 lines
Quoted 19 lines
Quoted 19 lines
Quoted 9 lines
Quoted 8 lines
Quoted 1 line

At least, based on the above it's my formal NAK from an auxdisplay perspective.

This is fine.

Just be aware, before you submit to LEDs again, that you need to use what is available in the LEDs subsystem to it's fullest, before hand-rolling all of your own APIs. The first submission didn't use a single LED API. This, as before, would be a big NACK also.

Quoted 6 lines

Thanks for the clarification.

Just to confirm — the current version of the driver is customized to allow user space to directly manipulate LP5812 registers and to support the device’s full feature set. Because of this, it doesn’t follow the standard LED interfaces.

But why? What's wrong with the LED ABI? (see also below question before answering to this one)

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Given that, would it be acceptable to submit this driver under the misc subsystem instead?

But these are LEDs in the hardware and you can access them as 4 individual LEDs, right?

Right. Please work with the API you are offered in the first instance. My first assumption is always that this driver isn't as special as you think it might be.

In direct mode, we can access them as individual LEDS. User doesn't need to select LEDs. In this mode, it is a simple LED driver.

However, user must select LEDs in scan mode. The hardware uses 4 pin to display 12 LEDs (or 4 RGB LEDs). Ordering of LED selection also impact to display capacibility. That why, I need to support another interface for user to controll hardware's registers.

In mix mode, we can control an individual LED and up to 6 scan LEDs. However, user must select the order of single LED and which LEDs will be use for scan function.

The main point is user must have capacibility in write information to hardware's registers to select LEDs in scan mode and mix mode.

Besides system modes (direct mode, scan mode, mix mode), each LED has manual mode and autonomous mode.

A example steps to display a LED in manual mode
# Set drive mode is Scan mode with 4 scan. Scan order 0 is out_0,
# Scan order 1 is out_1, Scan order 2 is out_2, and Scan order 3 is out_3 echo tcmscan:4:0:1:2:3 > /sys/bus/i2c/drivers/lp5812/1-001b/lp5812_chip_setup/dev_config # Enable led_A0
echo 1 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/activate
# Enable manual mode
echo manual > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/mode
# Set Dot Current
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/manual_dc
# Set Manual PWM
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/manual_pwm

However in autonomous mode, the steps are complicated
# Set drive mode is Scan mode with 4 scan. Scan order 0 is out_0,
# Scan order 1 is out_1, Scan order 2 is out_2, and Scan order 3 is out_3 echo tcmscan:4:0:1:2:3 > /sys/bus/i2c/drivers/lp5812/1-001b/lp5812_chip_setup/dev_config # Enable led_A0
echo 1 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/activate
# Enable autonomous mode
echo autonomous > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/mode
# Config autonomous animation mode: (only use AEU1, start pause time: 3.04s,

# stop pause time: 3.04s, playback time: infinite time)
echo 1:10:10:15 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/mode
# Config AEU1 playback times
echo 1 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/playback_time
# Config PWM
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm1
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm2
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm3
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm4
echo 100 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/pwm5
# Config slope time
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t1
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t2
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t3
echo 5 > /sys/bus/i2c/drivers/lp5812/1-001b/led_A0/AEU1/slope_time_t4
# Start autonomous
echo start > /sys/bus/i2c/drivers/lp5812/1-001b/lp5812_chip_setup/device_command
Quoted 6 lines

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

To me it sounds like you should start from the small steps, i.e. do not implement everything at once. And starting point of the 4 RGB LEDs sounds the best approach to me. Then, if needed, you can always move on with fancy features of this hardware on top of the existing code.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author
#23 lore raw
Quoted 6 lines · On Mon, 12 May 2025 Andy Shevchenko wrote:
Quoted 5 lines · Nam Tran
Quoted 4 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Nam Tran
Quoted 1 line · On Thu, 8 May 2025 Lee Jones wrote:

On Thu, 08 May 2025, Andy Shevchenko wrote:

...

Quoted 11 lines
Quoted 6 lines

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

To me it sounds like you should start from the small steps, i.e. do not implement everything at once. And starting point of the 4 RGB LEDs sounds the best approach to me. Then, if needed, you can always move on with fancy features of this hardware on top of the existing code.

Thanks for the suggestion.
I understand your point and agree that starting with standard LED APIs is the preferred approach.

However, the LP5812 hardware offers more advanced features, and I’d like to support end users all features as shown in the link: https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/.
It is easy for end user to investigate and use driver.

If I want to keep the current driver interface to meet this expectation, would it be acceptable to move it to the misc subsystem to better support the hardware?

Best regards,
Nam Tran

#24 lore raw
Quoted 7 lines · Nam Tran
Quoted 6 lines · On Mon, 12 May 2025 Andy Shevchenko wrote:
Quoted 5 lines · Nam Tran
Quoted 4 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Nam Tran
Quoted 1 line · On Thu, 8 May 2025 Lee Jones wrote:

On Thu, 08 May 2025, Andy Shevchenko wrote:

...

Quoted 12 lines
Quoted 11 lines
Quoted 6 lines

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

To me it sounds like you should start from the small steps, i.e. do not implement everything at once. And starting point of the 4 RGB LEDs sounds the best approach to me. Then, if needed, you can always move on with fancy features of this hardware on top of the existing code.

Quoted 6 lines

Thanks for the suggestion.
I understand your point and agree that starting with standard LED APIs is the preferred approach.

However, the LP5812 hardware offers more advanced features, and I’d like to support end users all features as shown in the link: https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/.
It is easy for end user to investigate and use driver.

I see. Good luck then!

Quoted 2 lines

If I want to keep the current driver interface to meet this expectation, would it be acceptable to move it to the misc subsystem to better support the hardware?

Don't ask me, I don't know what you want at the end and I have not so much time to invest in this anymore. Only what I'm sure about I already expressed in the previous replies and emails.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#25 lore raw
Quoted 30 lines · Andy Shevchenko
Quoted 7 lines · Nam Tran
Quoted 6 lines · On Mon, 12 May 2025 Andy Shevchenko wrote:
Quoted 5 lines · Nam Tran
Quoted 4 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Nam Tran
Quoted 1 line · On Thu, 8 May 2025 Lee Jones wrote:

On Thu, 08 May 2025, Andy Shevchenko wrote:

...

Quoted 12 lines
Quoted 11 lines
Quoted 6 lines

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

To me it sounds like you should start from the small steps, i.e. do not implement everything at once. And starting point of the 4 RGB LEDs sounds the best approach to me. Then, if needed, you can always move on with fancy features of this hardware on top of the existing code.

Quoted 6 lines

Thanks for the suggestion.
I understand your point and agree that starting with standard LED APIs is the preferred approach.

However, the LP5812 hardware offers more advanced features, and I’d like to support end users all features as shown in the link: https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/.
It is easy for end user to investigate and use driver.

Quoted 8 lines

I see. Good luck then!

Quoted 2 lines

If I want to keep the current driver interface to meet this expectation, would it be acceptable to move it to the misc subsystem to better support the hardware?

Don't ask me, I don't know what you want at the end and I have not so much time to invest in this anymore. Only what I'm sure about I already expressed in the previous replies and emails.

Briefly spoke to Greg (now Cc:ed). We can all discuss this together.

My 2c, whilst falling short of deep-diving, is as follows:

1. No one is going to enjoy reviewing a 3k line submission!

- Instead, submit the smallest driver you can whilst still retaining functionality. It is not good practice to fully enable a complicated driver such as this in a single submission - let alone a single patch.

2. Hand-rolling your own API from scratch is to be highly discouraged.

- There seems to be quite a bit of overlap in functionality between your bespoke API and LED's. The LED subsystem already supports a lot of what's being implemented here. Instead of letting the user configure the device directly, why not offer some high level options and attempt to infer the rest. If possible, the complexity of the device should be handed by driver, rather than placing the onus on the user.

3. Shoving this into Misc because you don't want to use the APIs that are already offered to you is not a good approach.

Signature · 1 line
Lee Jones [李琼斯]
#26 lore raw
In reply to Nam Tran

Hi Nam,

Quoted 17 lines · Nam Tran
Quoted 6 lines · On Mon, 12 May 2025 Andy Shevchenko wrote:
Quoted 5 lines · Nam Tran
Quoted 4 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Nam Tran
Quoted 1 line · On Thu, 8 May 2025 Lee Jones wrote:

On Thu, 08 May 2025, Andy Shevchenko wrote:

...

Quoted 7 lines
Quoted 6 lines

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

Quoted 7 lines
Quoted 4 lines

To me it sounds like you should start from the small steps, i.e. do not implement everything at once. And starting point of the 4 RGB LEDs sounds the best approach to me. Then, if needed, you can always move on with fancy features of this hardware on top of the existing code.

Thanks for the suggestion.
I understand your point and agree that starting with standard LED APIs is the preferred approach.

i.e. a drivers/leds/ driver.

Quoted 6 lines

However, the LP5812 hardware offers more advanced features, and I’d like to support end users all features as shown in the link: https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/.
It is easy for end user to investigate and use driver.

If I want to keep the current driver interface to meet this expectation, would it be acceptable to move it to the misc subsystem to better support the hardware?

I guess you can add custom sysfs controls for the advanced features on top of the drivers/leds/ driver?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#27 lore raw
Quoted 34 lines · Geert Uytterhoeven

Hi Nam,

Quoted 17 lines · Nam Tran
Quoted 6 lines · On Mon, 12 May 2025 Andy Shevchenko wrote:
Quoted 5 lines · Nam Tran
Quoted 4 lines · On Thu, 8 May 2025 Lee Jones wrote:
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Nam Tran
Quoted 1 line · On Thu, 8 May 2025 Lee Jones wrote:

On Thu, 08 May 2025, Andy Shevchenko wrote:

...

Quoted 7 lines
Quoted 6 lines

I think setting PWM also same as brightness_set API. However, there are many PWM config for a LED and it is one of other config to make autonomous mode work. Therefore, standard led API can use in some use cases only.

Please see the link below for a better visualization of how to configure the LP5812.
https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/

Quoted 7 lines
Quoted 4 lines

To me it sounds like you should start from the small steps, i.e. do not implement everything at once. And starting point of the 4 RGB LEDs sounds the best approach to me. Then, if needed, you can always move on with fancy features of this hardware on top of the existing code.

Thanks for the suggestion.
I understand your point and agree that starting with standard LED APIs is the preferred approach.

i.e. a drivers/leds/ driver.

Quoted 4 lines

However, the LP5812 hardware offers more advanced features, and I’d like to support end users all features as shown in the link: https://dev.ti.com/gallery/view/LED/LP581x/ver/0.10.0/.
It is easy for end user to investigate and use driver.

Quoted 5 lines
Quoted 2 lines

If I want to keep the current driver interface to meet this expectation, would it be acceptable to move it to the misc subsystem to better support the hardware?

I guess you can add custom sysfs controls for the advanced features on top of the drivers/leds/ driver?

Yes, exactly that.

Signature · 1 line
Lee Jones [李琼斯]
#28 lore raw
In reply to Nam Tran

Hi!

Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
Quoted 2 lines

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

Quoted 7 lines
Quoted 4 lines

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Well, IIRC it also supports automated animations, and that does not make sense on LED indicators. So... what device do _you_ have and how exactly is it used there?

Best regards,
Pavel

Signature · 2 lines
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!
author
#29 lore raw
Quoted 18 lines · On Wed, 30 Apr 2025 Pavel Machek wrote:
Quoted 18 lines
Quoted 17 lines
Quoted 10 lines
Quoted 2 lines

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

Quoted 6 lines
Quoted 2 lines

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Well, IIRC it also supports automated animations, and that does not make sense on LED indicators. So... what device do _you_ have and how exactly is it used there?

We’re using the LP5812 in a battery-powered smart speaker as a status indicator with visually enhanced lighting — for example, breathing effects during standby and fading effects during voice processing.

While the LP5812 supports autonomous animations, they’re used here to offload real-time brightness control from the main controller. Each LED’s animation engine enables smooth transitions like fade-in/fade-out and breathing effects. These patterns are configured once and run autonomously, saving MCU load and power, while still serving traditional indicator roles.

Best regards,
Nam Tran

#30 lore raw
In reply to Nam Tran

Hi!

Quoted 39 lines
Quoted 39 lines
Quoted 29 lines

Thank you, Pavel, for the confirmation. Thank you, Geert, for the review and the question.

I would like to make it clearer.

Quoted 14 lines · On Mon, 28 Apr 2025 Geert Uytterhoeven wrote:
Quoted 14 lines
Quoted 13 lines
Quoted 7 lines

- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Quoted 6 lines
Quoted 3 lines

It is 4x3 matrix. That means it is not suitable for LEDs. I don't believe it is suitable for PWM, either -- yes, it is 36 PWM outputs, but...

Is it intended to be used as a 4x3 matrix, or is this just an internal wiring detail, and should it be exposed as 12 individual LEDs instead?

Quoted 7 lines

The 4×3 matrix is a real and fundamental aspect of the LP5812’s operation. It is not just an internal wiring detail.
The device adopts a Time-Cross-Multiplexing (TCM) structure, where 4 output pins control 12 LED dots individually through scanning. Each pin includes both high-side and low-side drive circuits, meaning matrix multiplexing is required for proper operation — it cannot be treated as 12 completely independent LEDs.

Scanning is really a detail.

Quoted 7 lines
Quoted 4 lines

If this is used as rectangular 4x3 display, then it goes to auxdisplay.

If this is used as a power LED, SD activity LED, capslock and numlock ... placed randomly all around the device, then it goes LED subsystem.

The LP5812 is used for LED status indication in devices like smart speakers, wearables, and routers, not as a structured rectangular display.

Show us one device where it is used, photo would be best. I suspect that the router use might indeed qualify for LED subsystem.

You described is at 4x3 display, but it is really used as 4xRGB?

Quoted 1 line

Given that, it seems to match the LED subsystem better than auxdisplay, doesn't it?

Seems so, yes. From description, I assumed it was 4x3xRGB, not 4xRGB.

Best regards,
Pavel

Signature · 2 lines
I don't work for Nazis and criminals, and neither should you.
Boycott Putin, Trump, and Musk!
author
#31 lore raw
In reply to Andy Shevchenko
Quoted 17 lines · On Sun, 27 Apr 2025 Andy Shevchenko wrote:
Quoted 6 lines · Nam Tran

This patch series adds support for the TI/National Semiconductor LP5812 4x3 matrix RGB LED driver. The driver supports features such as autonomous animation and time-cross-multiplexing (TCM) for dynamic LED effects.

Quoted 9 lines

---
Changes in v8:
- Move driver to drivers/auxdisplay/ instead of drivers/leds/.
- Rename files from leds-lp5812.c/.h to lp5812.c/.h.
- Move ti,lp5812.yaml binding to auxdisplay/ directory,
and update the title and $id to match new path.
- No functional changes to the binding itself (keep Reviewed-by).
- Update commit messages and patch titles to reflect the move.
- Link to v7: https://lore.kernel.org/linux-leds/[email protected]/

Quoted 5 lines

Out of sudden without discussing with auxdisplay maintainers/reviewers? Thanks, no.
Please, put into the cover letter the meaningful summary of what's going on and why this becomes an auxdisplay issue. Brief review of the bindings sounds more likely like LEDS or PWM subsystems.

Apologies for moving the driver to auxdisplay without prior discussion with you and the other auxdisplay maintainers.

The decision to move it was based on advice from Lee Jones (LED subsystem co-maintainer). He reviewed the v7 series while it was still under drivers/leds/, and explicitly recommended that I move it to drivers/auxdisplay/.
Reference: https://lore.kernel.org/linux-leds/[email protected]/

Here’s a brief summary of why LP5812 fits better in auxdisplay than in LEDS or PWM subsystems:
- 4 outputs drive 12 LEDs (4 RGB) using time-cross-multiplexing (TCM).
- An autonomous animation engine creates complex visual effects without CPU intervention.
- Supports analog current control, PWM dimming up to 24kHz, de-ghosting, and phase shifting, all targeting dynamic visual outputs rather than static LED states.

I will prepare a v9 with an updated cover letter summarizing this background.
I am also happy to make further adjustments based on your and other auxdisplay maintainers’ guidance.

Thanks for reviewing and helping me through the submission process.

Best regards,
Nam Tran