Skip to content

Commit 939757a

Browse files
vicgal-remtechlag-linaro
authored andcommitted
leds: Add LED1202 I2C driver
The output current can be adjusted separately for each channel by 8-bit analog (current sink input) and 12-bit digital (PWM) dimming control. The LED1202 implements 12 low-side current generators with independent dimming control. Internal volatile memory allows the user to store up to 8 different patterns, each pattern is a particular output configuration in terms of PWM duty-cycle (on 4096 steps). Analog dimming (on 256 steps) is per channel but common to all patterns. Each device tree LED node will have a corresponding entry in /sys/class/leds with the label name. The brightness property corresponds to the per channel analog dimming, while the patterns[1-8] to the PWM dimming control. Signed-off-by: Vicentiu Galanopulo <vicentiu.galanopulo@remote-tech.co.uk> Link: https://lore.kernel.org/r/20241218183401.41687-4-vicentiu.galanopulo@remote-tech.co.uk Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 599b92f commit 939757a

File tree

3 files changed

+427
-0
lines changed

3 files changed

+427
-0
lines changed

drivers/leds/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,16 @@ config LEDS_LM36274
942942
Say Y to enable the LM36274 LED driver for TI LMU devices.
943943
This supports the LED device LM36274.
944944

945+
config LEDS_ST1202
946+
tristate "LED Support for STMicroelectronics LED1202 I2C chips"
947+
depends on LEDS_CLASS
948+
depends on I2C
949+
depends on OF
950+
select LEDS_TRIGGERS
951+
help
952+
Say Y to enable support for LEDs connected to LED1202
953+
LED driver chips accessed via the I2C bus.
954+
945955
config LEDS_TPS6105X
946956
tristate "LED support for TI TPS6105X"
947957
depends on LEDS_CLASS

drivers/leds/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ obj-$(CONFIG_LEDS_POWERNV) += leds-powernv.o
8181
obj-$(CONFIG_LEDS_PWM) += leds-pwm.o
8282
obj-$(CONFIG_LEDS_REGULATOR) += leds-regulator.o
8383
obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o
84+
obj-$(CONFIG_LEDS_ST1202) += leds-st1202.o
8485
obj-$(CONFIG_LEDS_SUN50I_A100) += leds-sun50i-a100.o
8586
obj-$(CONFIG_LEDS_SUNFIRE) += leds-sunfire.o
8687
obj-$(CONFIG_LEDS_SYSCON) += leds-syscon.o

0 commit comments

Comments
 (0)