mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5] leds: qcom-lpg: Add PM660L configuration and compatible
@ 2024-02-04 17:24 Marijn Suijten
  2024-02-08 12:13 ` (subset) " Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Marijn Suijten @ 2024-02-04 17:24 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones
  Cc: linux-leds, linux-kernel, linux-arm-msm, phone-devel,
	Bjorn Andersson, Johan Hovold, Konrad Dybcio, Martin Botka,
	Jami Kettunen, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Marijn Suijten, Bjorn Andersson

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>
---
Changes since v4:

- Rebased on -next and resolve conflict with removed lpg_remove();
- v4: https://lore.kernel.org/linux-leds/20220719211848.1653920-2-marijn.suijten@somainline.org/
---
 drivers/leds/rgb/leds-qcom-lpg.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 156b73d1f4a2..ab298391f9e0 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1360,6 +1360,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[]) {
@@ -1502,6 +1519,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 },

---
base-commit: 01af33cc9894b4489fb68fa35c40e9fe85df63dc
change-id: 20240204-pm660l-lpg-f35b8a3a3840

Best regards,
-- 
Marijn Suijten <marijn.suijten@somainline.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH v5] leds: qcom-lpg: Add PM660L configuration and compatible
  2024-02-04 17:24 [PATCH v5] leds: qcom-lpg: Add PM660L configuration and compatible Marijn Suijten
@ 2024-02-08 12:13 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2024-02-08 12:13 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Marijn Suijten
  Cc: linux-leds, linux-kernel, linux-arm-msm, phone-devel,
	Bjorn Andersson, Johan Hovold, Konrad Dybcio, Martin Botka,
	Jami Kettunen, ~postmarketos/upstreaming,
	AngeloGioacchino Del Regno, Bjorn Andersson

On Sun, 04 Feb 2024 18:24:20 +0100, Marijn Suijten wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] leds: qcom-lpg: Add PM660L configuration and compatible
      commit: 0e848bb4630e12099636fde050cadad33221045f

--
Lee Jones [李琼斯]


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-08 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 17:24 [PATCH v5] leds: qcom-lpg: Add PM660L configuration and compatible Marijn Suijten
2024-02-08 12:13 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®