Skip to content

Commit 1c5b72e

Browse files
MarijnS95lag-linaro
authored andcommitted
leds: qcom-lpg: Add PM660L configuration and compatible
Inherit PM660L PMIC LPG/triled block configuration from downstream drivers and DT sources, consisting of a triled block with automatic trickle charge control and source selection, three colored led channels belonging to the synchronized triled block and one loose PWM channel. Signed-off-by: Marijn Suijten <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent ccc35ff commit 1c5b72e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/leds/rgb/leds-qcom-lpg.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,23 @@ static int lpg_probe(struct platform_device *pdev)
16441644
return lpg_add_pwm(lpg);
16451645
}
16461646

1647+
static const struct lpg_data pm660l_lpg_data = {
1648+
.lut_base = 0xb000,
1649+
.lut_size = 49,
1650+
1651+
.triled_base = 0xd000,
1652+
.triled_has_atc_ctl = true,
1653+
.triled_has_src_sel = true,
1654+
1655+
.num_channels = 4,
1656+
.channels = (const struct lpg_channel_data[]) {
1657+
{ .base = 0xb100, .triled_mask = BIT(5) },
1658+
{ .base = 0xb200, .triled_mask = BIT(6) },
1659+
{ .base = 0xb300, .triled_mask = BIT(7) },
1660+
{ .base = 0xb400 },
1661+
},
1662+
};
1663+
16471664
static const struct lpg_data pm8916_pwm_data = {
16481665
.num_channels = 1,
16491666
.channels = (const struct lpg_channel_data[]) {
@@ -1790,6 +1807,7 @@ static const struct lpg_data pmk8550_pwm_data = {
17901807
};
17911808

17921809
static const struct of_device_id lpg_of_table[] = {
1810+
{ .compatible = "qcom,pm660l-lpg", .data = &pm660l_lpg_data },
17931811
{ .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data },
17941812
{ .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data },
17951813
{ .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data },

0 commit comments

Comments
 (0)