Thread (5 messages) 5 messages, 1 author, 2021-11-26
STALE1652d REVIEWED: 2 (1M)
Revisions (3)
  1. v3 [diff vs current]
  2. v3 current
  3. v4 [diff vs current]

[RESEND PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver

From: Satya Priya <hidden>
Date: 2021-11-26 09:14:44
Also in: linux-arm-msm, linux-leds, lkml
Subsystem: led subsystem, the rest · Maintainers: Lee Jones, Pavel Machek, Linus Torvalds

Add pm8350c compatible and lpg_data to the driver.

Signed-off-by: Satya Priya <redacted>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Stephen Boyd <redacted>
---
Changes in V2:
 - Added const for lpg_channel_data[] struct.

Changes in V3:
  - Correct the num_channels and add respective base addresses.

 drivers/leds/rgb/leds-qcom-lpg.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 45ef4ec..ad99a9b 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1275,9 +1275,22 @@ static const struct lpg_data pm8150l_lpg_data = {
 	},
 };
 
+static const struct lpg_data pm8350c_pwm_data = {
+	.pwm_9bit_mask = BIT(2),
+
+	.num_channels = 4,
+	.channels = (const struct lpg_channel_data[]) {
+		{ .base = 0xe800 },
+		{ .base = 0xe900 },
+		{ .base = 0xea00 },
+		{ .base = 0xeb00 },
+	},
+};
+
 static const struct of_device_id lpg_of_table[] = {
 	{ .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data },
 	{ .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data },
+	{ .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data },
 	{ .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data },
 	{ .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data },
 	{ .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help