leds: lp5860: Add I2C interface support
Subsystems (2)
PATCH v2 1/1 leds: lp5860: Add I2C interface support
This patch adds I2C bus support to the Texas Instruments LP5860 RGB LED matrix driver.
The LP5860 supports both SPI and I2C interfaces depending on the hardware IFS pin configuration, but the existing driver only implements the SPI bus interface (leds-lp5860-spi).
Changes include:
- Adding the leds-lp5860-i2c bus driver module to handle the LP5860's 10-bit register addressing scheme over I2C.
- Updating Kconfig and Makefile so I2C and SPI bus support can be built independently or together.
Tested on ZymqMP (ZU3) with an LP5860 connected over an AXI IIC at base address 0x40 (A1=0, A0=0) at 400kHz.
---
Changes in v2:
- Use designated initializer (.name = "lp5860") in i2c_device_id table
- Link to v1: https://patch.msgid.link/[email protected]
To: Nam Tran <[email protected]>
To: Lee Jones <[email protected]>
To: Pavel Machek <[email protected]>
To: Griffin Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/leds/rgb/Kconfig | 12 ++++ drivers/leds/rgb/Makefile | 1 + drivers/leds/rgb/leds-lp5860-i2c.c | 139 +++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+)
drivers/leds/rgb/Kconfig +12 -0
@@ -78,6 +78,18 @@ config LEDS_LP5860_SPI To compile this driver as a module, choose M here: the module will be called leds-lp5860-spi. +config LEDS_LP5860_I2C + tristate "LED Support for TI LP5860 I2C LED driver chip" + depends on I2C + depends on OF + select LEDS_LP5860_CORE + help + If you say yes here you get support for the Texas Instruments + LP5860 LED driver for I2C bus connections. + + To compile this driver as a module, choose M here: the + module will be called leds-lp5860-i2c. + config LEDS_NCP5623 tristate "LED support for NCP5623" depends on I2C
drivers/leds/rgb/Makefile +1 -0
@@ -6,6 +6,7 @@ obj-$(CONFIG_LEDS_KTD202X) += leds-ktd202x.o obj-$(CONFIG_LEDS_LP5812) += leds-lp5812.o obj-$(CONFIG_LEDS_LP5860_CORE) += leds-lp5860-core.o obj-$(CONFIG_LEDS_LP5860_SPI) += leds-lp5860-spi.o +obj-$(CONFIG_LEDS_LP5860_I2C) += leds-lp5860-i2c.o obj-$(CONFIG_LEDS_NCP5623) += leds-ncp5623.o obj-$(CONFIG_LEDS_PWM_MULTICOLOR) += leds-pwm-multicolor.o obj-$(CONFIG_LEDS_QCOM_LPG) += leds-qcom-lpg.o
drivers/leds/rgb/leds-lp5860-i2c.c new file +139 -0
139 lines not on this page · raw message
---
base-commit: c016466c8c8b01af27ac66d97b64fa9c9e431a3d
change-id: 20261120-add-i2c-support-for-lp5860-97f38b2ebe1c
Best regards,
Signature · 1 line
Peter LaDow <[email protected]>
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 15 lines
From: Peter LaDow <[email protected]>
This patch adds I2C bus support to the Texas Instruments LP5860 RGB LED matrix driver.
The LP5860 supports both SPI and I2C interfaces depending on the hardware IFS pin configuration, but the existing driver only implements the SPI bus interface (leds-lp5860-spi).
Changes include:
- Adding the leds-lp5860-i2c bus driver module to handle the LP5860's 10-bit register addressing scheme over I2C.
- UpdatingKconfigandMakefileso I2C and SPI bus support can be built independently or together.
Quoted 4 lines
Tested on ZymqMP (ZU3) with an LP5860 connected over an AXI IIC at base address
0x40(A1=0, A0=0) at 400kHz.Signed-off-by Peter LaDow <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1