Skip to content

Commit 30c6743

Browse files
Ansuellag-linaro
authored andcommitted
leds: leds-lp5569: Add support for Texas Instruments LP5569
Add support for Texas Instruments LP5569 LED driver. Texas Instruments LP5569 is 9 channels chip with programmable engines. It almost a copy of LP5523 with fundamental changes to regs order and regs content. Has difference in how the clock is handled and doesn't support detecting clock time automatically, different handling for selftest and different scheme for the status regs. LED chip supports ENGINE and MUX to group LED and run precompiled code with magic values to run patterns. This is loaded via the sysfs entry and it's passed as a string of ASCII HEX char. One some devices using this LED Controller (a NBG7815 Router) it was found loading big precompiled pattern with up to 96 bytes of code. To have support for this "extended" scenario, hardcode each engine to support 4 pages of precompiled pattern (128 bytes of code) and 1 page for each MUX. This gives plenty of space for any kind precompiled pattern keeping simple logic for page handling of each engine and mux. Signed-off-by: Christian Marangi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 49d943a commit 30c6743

File tree

3 files changed

+558
-3
lines changed

3 files changed

+558
-3
lines changed

drivers/leds/Kconfig

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,16 +429,16 @@ config LEDS_LP50XX
429429
module will be called leds-lp50xx.
430430

431431
config LEDS_LP55XX_COMMON
432-
tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501"
432+
tristate "Common Driver for TI/National LP5521/5523/55231/5562/5569/8501"
433433
depends on LEDS_CLASS
434434
depends on LEDS_CLASS_MULTICOLOR
435435
depends on OF
436436
depends on I2C
437437
select FW_LOADER
438438
select FW_LOADER_USER_HELPER
439439
help
440-
This option supports common operations for LP5521/5523/55231/5562/8501
441-
devices.
440+
This option supports common operations for LP5521/5523/55231/5562/5569/
441+
8501 devices.
442442

443443
config LEDS_LP5521
444444
tristate "LED Support for N.S. LP5521 LED driver chip"
@@ -471,6 +471,16 @@ config LEDS_LP5562
471471
Driver provides direct control via LED class and interface for
472472
programming the engines.
473473

474+
config LEDS_LP5569
475+
tristate "LED Support for TI LP5569 LED driver chip"
476+
depends on LEDS_CLASS && I2C
477+
depends on LEDS_LP55XX_COMMON
478+
help
479+
If you say yes here you get support for TI LP5569 LED driver.
480+
It is 9 channels chip with programmable engines.
481+
Driver provides direct control via LED class and interface for
482+
programming the engines.
483+
474484
config LEDS_LP8501
475485
tristate "LED Support for TI LP8501 LED driver chip"
476486
depends on LEDS_CLASS && I2C

drivers/leds/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ obj-$(CONFIG_LEDS_LP50XX) += leds-lp50xx.o
5252
obj-$(CONFIG_LEDS_LP5521) += leds-lp5521.o
5353
obj-$(CONFIG_LEDS_LP5523) += leds-lp5523.o
5454
obj-$(CONFIG_LEDS_LP5562) += leds-lp5562.o
55+
obj-$(CONFIG_LEDS_LP5569) += leds-lp5569.o
5556
obj-$(CONFIG_LEDS_LP55XX_COMMON) += leds-lp55xx-common.o
5657
obj-$(CONFIG_LEDS_LP8501) += leds-lp8501.o
5758
obj-$(CONFIG_LEDS_LP8788) += leds-lp8788.o

0 commit comments

Comments
 (0)