Skip to content

Commit 96a2e24

Browse files
Fenglin Wulag-linaro
authored andcommitted
leds: flash: Add driver to support flash LED module in QCOM PMICs
Add initial driver to support flash LED module found in Qualcomm Technologies, Inc. PMICs. The flash module can have 3 or 4 channels and each channel can be controlled indepedently and support full scale current up to 1.5 A. It also supports connecting two channels together to supply one LED component with full scale current up to 2 A. In that case, the current will be split on each channel symmetrically and the channels will be enabled and disabled at the same time. Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com> Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4 + pm6150l Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230303095023.538917-2-quic_fenglinw@quicinc.com
1 parent 8f0adae commit 96a2e24

File tree

3 files changed

+789
-0
lines changed

3 files changed

+789
-0
lines changed

drivers/leds/flash/Kconfig

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

64+
config LEDS_QCOM_FLASH
65+
tristate "LED support for flash module inside Qualcomm Technologies, Inc. PMIC"
66+
depends on MFD_SPMI_PMIC || COMPILE_TEST
67+
depends on LEDS_CLASS && OF
68+
depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
69+
select REGMAP
70+
help
71+
This option enables support for the flash module found in Qualcomm
72+
Technologies, Inc. PMICs. The flash module can have 3 or 4 flash LED
73+
channels and each channel is programmable to support up to 1.5 A full
74+
scale current. It also supports connecting two channels' output together
75+
to supply one LED component to achieve current up to 2 A. In such case,
76+
the total LED current will be split symmetrically on each channel and
77+
they will be enabled/disabled at the same time.
78+
6479
config LEDS_RT4505
6580
tristate "LED support for RT4505 flashlight controller"
6681
depends on I2C && OF

drivers/leds/flash/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ obj-$(CONFIG_LEDS_AS3645A) += leds-as3645a.o
66
obj-$(CONFIG_LEDS_KTD2692) += leds-ktd2692.o
77
obj-$(CONFIG_LEDS_LM3601X) += leds-lm3601x.o
88
obj-$(CONFIG_LEDS_MAX77693) += leds-max77693.o
9+
obj-$(CONFIG_LEDS_QCOM_FLASH) += leds-qcom-flash.o
910
obj-$(CONFIG_LEDS_RT4505) += leds-rt4505.o
1011
obj-$(CONFIG_LEDS_RT8515) += leds-rt8515.o
1112
obj-$(CONFIG_LEDS_SGM3140) += leds-sgm3140.o

0 commit comments

Comments
 (0)