Skip to content

Commit fa31e42

Browse files
ChiYuan Huanglag-linaro
authored andcommitted
leds: flash: mt6370: Add MediaTek MT6370 flashlight 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 MT6370 Flash LED driver. Flash LED in MT6370 has 2 channels and support torch/strobe 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/52480420a160e5a4c71715fbbf105e684a16e7c2.1678430444.git.chiaen_wu@richtek.com
1 parent 5c38376 commit fa31e42

3 files changed

Lines changed: 587 additions & 0 deletions

File tree

drivers/leds/flash/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ config LEDS_MT6360
6161
Independent current sources supply for each flash LED support torch
6262
and strobe mode.
6363

64+
config LEDS_MT6370_FLASH
65+
tristate "Flash LED Support for MediaTek MT6370 PMIC"
66+
depends on LEDS_CLASS
67+
depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
68+
depends on MFD_MT6370
69+
help
70+
Support 2 channels and torch/strobe mode.
71+
Say Y here to enable support for
72+
MT6370_FLASH_LED device.
73+
74+
This driver can also be built as a module. If so, the module
75+
will be called "leds-mt6370-flash".
76+
6477
config LEDS_QCOM_FLASH
6578
tristate "LED support for flash module inside Qualcomm Technologies, Inc. PMIC"
6679
depends on MFD_SPMI_PMIC || COMPILE_TEST

drivers/leds/flash/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33
obj-$(CONFIG_LEDS_MT6360) += leds-mt6360.o
4+
obj-$(CONFIG_LEDS_MT6370_FLASH) += leds-mt6370-flash.o
45
obj-$(CONFIG_LEDS_AAT1290) += leds-aat1290.o
56
obj-$(CONFIG_LEDS_AS3645A) += leds-as3645a.o
67
obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o

0 commit comments

Comments
 (0)