Commit 0ae8dc1a authored by Dylan Van Assche's avatar Dylan Van Assche Committed by Lee Jones

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: default avatarDylan Van Assche <me@dylanvanassche.be>
Link: https://lore.kernel.org/r/20230507172941.364852-2-me@dylanvanassche.beSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent ea0c0a85
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
#define FLASH_TYPE_VAL 0x18 #define FLASH_TYPE_VAL 0x18
#define FLASH_SUBTYPE_REG 0x05 #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_SUBTYPE_4CH_VAL 0x07
#define FLASH_STS_3CH_OTST1 BIT(0) #define FLASH_STS_3CH_OTST1 BIT(0)
...@@ -682,7 +683,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev) ...@@ -682,7 +683,7 @@ static int qcom_flash_led_probe(struct platform_device *pdev)
return rc; 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->hw_type = QCOM_MVFLASH_3CH;
flash_data->max_channels = 3; flash_data->max_channels = 3;
regs = mvflash_3ch_regs; regs = mvflash_3ch_regs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment