linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ 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] 10+ messages in thread
* Re: [PATCH 2/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
@ 2024-02-26  7:38 Krzysztof Kozlowski
  2024-02-26 10:57 ` [PATCH 1/3] leds: qcom-lpg: " Gianluca Boiano
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-26  7:38 UTC (permalink / raw)
  To: Gianluca Boiano, Pavel Machek, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
	Konrad Dybcio, linux-leds, devicetree, linux-kernel,
	linux-arm-msm

On 24/02/2024 23:49, Gianluca Boiano wrote:
> Update leds-qcom-lpg binding to support PMI8950 PWM.
> 
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---
>  Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
> index 6649ca2ec805..ea617fad5a4e 100644
> --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
> @@ -27,6 +27,7 @@ properties:
>            - qcom,pm8994-lpg
>            - qcom,pmc8180c-lpg
>            - qcom,pmi632-lpg
> +          - qcom,pmi8950-pwm

You will need to update the if: as well. Last commit Anjelique Melendez
made there a bit of a mess... Please rebase on top of:
https://lore.kernel.org/linux-devicetree/20240226073713.19045-1-krzysztof.kozlowski@linaro.org/T/#t

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM
@ 2024-02-24 22:49 Gianluca Boiano
  0 siblings, 0 replies; 10+ 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] 10+ messages in thread

end of thread, other threads:[~2024-04-11 16:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2024-04-02 12:35 ` [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
2024-04-10 18:14   ` Konrad Dybcio
2024-04-02 12:35 ` [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
2024-04-02 17:54   ` Conor Dooley
2024-04-11 16:46 ` (subset) [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2024-02-26  7:38 [PATCH 2/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM Krzysztof Kozlowski
2024-02-26 10:57 ` [PATCH 1/3] leds: qcom-lpg: " Gianluca Boiano
2024-02-24 22:49 Gianluca Boiano

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).