Skip to content

Commit 5c38376

Browse files
ChiYuan Huanglag-linaro
authored andcommitted
leds: rgb: mt6370: Add MediaTek MT6370 current sink type LED Indicator support
The MediaTek MT6370 is a highly-integrated smart power management IC, which includes a single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & Power Delivery (PD) controller, dual Flash LED current sources, a RGB LED driver, a backlight WLED driver, a display bias driver and a general LDO for portable devices. Add support for the MediaTek MT6370 Current Sink Type LED Indicator driver. It can control four channels current-sink RGB LEDs with 3 modes: constant current, PWM, and breath mode. Co-developed-by: Alice Chen <alice_chen@richtek.com> Signed-off-by: Alice Chen <alice_chen@richtek.com> Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Signed-off-by: ChiaEn Wu <chiaen_wu@richtek.com> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/1df93a583c3f508a7158b83b95857e9bce235e1b.1678430444.git.chiaen_wu@richtek.com
1 parent d4856dc commit 5c38376

3 files changed

Lines changed: 1024 additions & 0 deletions

File tree

drivers/leds/rgb/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,17 @@ config LEDS_QCOM_LPG
2626

2727
If compiled as a module, the module will be named leds-qcom-lpg.
2828

29+
config LEDS_MT6370_RGB
30+
tristate "LED Support for MediaTek MT6370 PMIC"
31+
depends on MFD_MT6370
32+
select LINEAR_RANGE
33+
help
34+
Say Y here to enable support for MT6370_RGB LED device.
35+
In MT6370, there are four channel current-sink LED drivers that
36+
support hardware pattern for constant current, PWM, and breath mode.
37+
Isink4 channel can also be used as a CHG_VIN power good indicator.
38+
39+
This driver can also be built as a module. If so, the module
40+
will be called "leds-mt6370-rgb".
41+
2942
endif # LEDS_CLASS_MULTICOLOR

drivers/leds/rgb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
obj-$(CONFIG_LEDS_PWM_MULTICOLOR) += leds-pwm-multicolor.o
44
obj-$(CONFIG_LEDS_QCOM_LPG) += leds-qcom-lpg.o
5+
obj-$(CONFIG_LEDS_MT6370_RGB) += leds-mt6370-rgb.o

0 commit comments

Comments
 (0)