linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM
@ 2024-02-24 22:49 Gianluca Boiano
  2024-02-24 22:49 ` [PATCH 2/3] dt-bindings: leds: leds-qcom-lpg: " Gianluca Boiano
  2024-02-24 22:49 ` [PATCH 3/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
  0 siblings, 2 replies; 14+ messages in thread
From: Gianluca Boiano @ 2024-02-24 22:49 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Bjorn Andersson, Konrad Dybcio, linux-leds,
	devicetree, linux-kernel, linux-arm-msm
  Cc: Gianluca Boiano

The PMI8950 PMIC contains 1 PWM channel

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
 drivers/leds/rgb/leds-qcom-lpg.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 6bdc5b923f98..9467c796bd04 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1693,6 +1693,13 @@ static const struct lpg_data pm8941_lpg_data = {
 	},
 };
 
+static const struct lpg_data pmi8950_pwm_data = {
+	.num_channels = 1,
+	.channels = (const struct lpg_channel_data[]) {
+		{ .base = 0xb000 },
+	},
+};
+
 static const struct lpg_data pm8994_lpg_data = {
 	.lut_base = 0xb000,
 	.lut_size = 64,
@@ -1819,6 +1826,7 @@ static const struct of_device_id lpg_of_table[] = {
 	{ .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data },
 	{ .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },
 	{ .compatible = "qcom,pmi632-lpg", .data = &pmi632_lpg_data },
+	{ .compatible = "qcom,pmi8950-pwm", .data = &pmi8950_pwm_data },
 	{ .compatible = "qcom,pmi8994-lpg", .data = &pmi8994_lpg_data },
 	{ .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data },
 	{ .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg.
@ 2024-04-02 12:35 Gianluca Boiano
  2024-04-02 12:35 ` [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
  0 siblings, 1 reply; 14+ messages in thread
From: Gianluca Boiano @ 2024-04-02 12:35 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-leds, linux-kernel, linux-arm-msm, devicetree, Gianluca Boiano

The first patch updates the device tree bindings for leds-qcom-lpg to
include support for PMI8950 PWM.

The second patch adds a pwm node to the device tree for the PMI8950. This
node is found on some msm8953 devices, such as the Xiaomi Mido, and its
inclusion in the device tree will enable infrared LED functionality on
these devices.

The final patch adds support for the PMI8950 PWM to the leds-qcom-lpg
driver.

The PMI8950 PMIC contains one PWM channel.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
Gianluca Boiano (3):
      leds: qcom-lpg: Add support for PMI8950 PWM
      arm64: dts: qcom: pmi8950: add pwm node
      dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM

 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 4 ++--
 arch/arm64/boot/dts/qcom/pmi8950.dtsi                     | 8 ++++++++
 drivers/leds/rgb/leds-qcom-lpg.c                          | 8 ++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
---
base-commit: c0b832517f627ead3388c6f0c74e8ac10ad5774b
change-id: 20240402-pmi8950-pwm-support-f591864b1e28

Best regards,
-- 
Gianluca Boiano <morf3089@gmail.com>


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

end of thread, other threads:[~2024-04-10 18:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-24 22:49 [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
2024-02-24 22:49 ` [PATCH 2/3] dt-bindings: leds: leds-qcom-lpg: " Gianluca Boiano
2024-02-26  7:38   ` Krzysztof Kozlowski
2024-02-26  9:37     ` [PATCH v2 1/3] leds: qcom-lpg: " Gianluca Boiano
2024-02-26  9:37       ` [PATCH v2 2/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
2024-02-26  9:37       ` [PATCH v2 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
2024-02-26 10:50       ` [PATCH v2 1/3] leds: qcom-lpg: " Konrad Dybcio
2024-02-26 10:57     ` [PATCH " Gianluca Boiano
2024-02-26 10:57       ` [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
2024-02-26 10:57       ` [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
2024-02-26 12:37         ` Krzysztof Kozlowski
2024-02-24 22:49 ` [PATCH 3/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
2024-04-02 12:35 [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg Gianluca Boiano
2024-04-02 12:35 ` [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
2024-04-10 18:14   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).