aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/leds
diff options
context:
space:
mode:
authorMarijn Suijten <marijn.suijten@somainline.org>2024-02-04 18:24:20 +0100
committerLee Jones <lee@kernel.org>2024-03-07 08:48:07 +0000
commit1c5b72e60c56f17a54f627bde290bd2bf214ce16 (patch)
treeb72c711a01ab4947ba348cf9dba7ab2d98456191 /drivers/leds
parentleds: spi-byte: Use devm_led_classdev_register_ext() (diff)
downloadwireguard-linux-1c5b72e60c56f17a54f627bde290bd2bf214ce16.tar.xz
wireguard-linux-1c5b72e60c56f17a54f627bde290bd2bf214ce16.zip
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 <marijn.suijten@somainline.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20240204-pm660l-lpg-v5-1-2f54d1a0894b@somainline.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/rgb/leds-qcom-lpg.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 6226864145a6..0c7d83886670 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1644,6 +1644,23 @@ static int lpg_probe(struct platform_device *pdev)
return lpg_add_pwm(lpg);
}
+static const struct lpg_data pm660l_lpg_data = {
+ .lut_base = 0xb000,
+ .lut_size = 49,
+
+ .triled_base = 0xd000,
+ .triled_has_atc_ctl = true,
+ .triled_has_src_sel = true,
+
+ .num_channels = 4,
+ .channels = (const struct lpg_channel_data[]) {
+ { .base = 0xb100, .triled_mask = BIT(5) },
+ { .base = 0xb200, .triled_mask = BIT(6) },
+ { .base = 0xb300, .triled_mask = BIT(7) },
+ { .base = 0xb400 },
+ },
+};
+
static const struct lpg_data pm8916_pwm_data = {
.num_channels = 1,
.channels = (const struct lpg_channel_data[]) {
@@ -1790,6 +1807,7 @@ static const struct lpg_data pmk8550_pwm_data = {
};
static const struct of_device_id lpg_of_table[] = {
+ { .compatible = "qcom,pm660l-lpg", .data = &pm660l_lpg_data },
{ .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data },
{ .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data },
{ .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data },