summaryrefslogtreecommitdiff
path: root/drivers/leds/flash
diff options
context:
space:
mode:
authorDylan Van Assche <me@dylanvanassche.be>2023-05-07 19:29:40 +0200
committerLee Jones <lee@kernel.org>2023-05-25 12:16:19 +0100
commit0ae8dc1a1a998c7b6b866cb83de83bea5740fb8e (patch)
tree97c65e592a0ddc1d02f0b2424b2fd338b869cafd /drivers/leds/flash
parentea0c0a85363380e7e80405d47cf63ce84cbc7b65 (diff)
leds: flash: leds-qcom-flash: Add PMI8998 support
Add subtype for the Qualcomm PMI8998 PMIC to support it besides the PM8150 PMIC which has the same registers. Adjust the driver to recognize both PMIC subtypes as a 3 channel LED driver. Signed-off-by: Dylan Van Assche <me@dylanvanassche.be> Link: https://lore.kernel.org/r/20230507172941.364852-2-me@dylanvanassche.be Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds/flash')
-rw-r--r--drivers/leds/flash/leds-qcom-flash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index 90a24fa25a49..16045b5d89b1 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -18,7 +18,8 @@
#define FLASH_TYPE_VAL 0x18
#define FLASH_SUBTYPE_REG 0x05
-#define FLASH_SUBTYPE_3CH_VAL 0x04
+#define FLASH_SUBTYPE_3CH_PM8150_VAL 0x04
+#define FLASH_SUBTYPE_3CH_PMI8998_VAL 0x03
#define FLASH_SUBTYPE_4CH_VAL 0x07
#define FLASH_STS_3CH_OTST1 BIT(0)
@@ -682,7 +683,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev)
return rc;
}
- if (val == FLASH_SUBTYPE_3CH_VAL) {
+ if (val == FLASH_SUBTYPE_3CH_PM8150_VAL || val == FLASH_SUBTYPE_3CH_PMI8998_VAL) {
flash_data->hw_type = QCOM_MVFLASH_3CH;
flash_data->max_channels = 3;
regs = mvflash_3ch_regs;