]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
leds: rgb: Update PM8350C lpg_data to support two-nvmem PPG Scheme
authorAnjelique Melendez <quic_amelende@quicinc.com>
Thu, 21 Dec 2023 18:58:37 +0000 (10:58 -0800)
committerLee Jones <lee@kernel.org>
Thu, 7 Mar 2024 08:47:54 +0000 (08:47 +0000)
Update the pm8350c lpg_data struct so that pm8350c devices are treated as
PWM devices that support two-nvmem PPG scheme.

Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
Link: https://lore.kernel.org/r/20231221185838.28440-8-quic_amelende@quicinc.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/rgb/leds-qcom-lpg.c

index 9d0717f770bacd73f44aa031411fefd5eb49e275..6226864145a653220588e0da8fa83219a48654fa 100644 (file)
@@ -1770,11 +1770,13 @@ static const struct lpg_data pm8150l_lpg_data = {
 static const struct lpg_data pm8350c_pwm_data = {
        .triled_base = 0xef00,
 
+       .lut_size = 122,
+
        .num_channels = 4,
        .channels = (const struct lpg_channel_data[]) {
-               { .base = 0xe800, .triled_mask = BIT(7) },
-               { .base = 0xe900, .triled_mask = BIT(6) },
-               { .base = 0xea00, .triled_mask = BIT(5) },
+               { .base = 0xe800, .triled_mask = BIT(7), .sdam_offset = 0x48 },
+               { .base = 0xe900, .triled_mask = BIT(6), .sdam_offset = 0x56 },
+               { .base = 0xea00, .triled_mask = BIT(5), .sdam_offset = 0x64 },
                { .base = 0xeb00 },
        },
 };