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
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ 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] 11+ messages in thread

* [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM
  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 ` 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
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ 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 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] 11+ messages in thread

* [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node
  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-02 12:35 ` 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
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ 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

This node is actually found on some msm8953 devices (xiaomi-mido) and
allows irled enablement

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
 arch/arm64/boot/dts/qcom/pmi8950.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmi8950.dtsi b/arch/arm64/boot/dts/qcom/pmi8950.dtsi
index 1029f3b1bb9a..b4822cb17a37 100644
--- a/arch/arm64/boot/dts/qcom/pmi8950.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8950.dtsi
@@ -84,6 +84,14 @@ pmic@3 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
+		pmi8950_pwm: pwm@b000 {
+			compatible = "qcom,pmi8950-pwm";
+			reg = <0xb000 0x100>;
+			#pwm-cells = <2>;
+
+			status = "disabled";
+		};
+
 		pmi8950_wled: leds@d800 {
 			compatible = "qcom,pmi8950-wled";
 			reg = <0xd800>, <0xd900>;

-- 
2.44.0


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

* [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
  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-02 12:35 ` [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
@ 2024-04-02 12:35 ` 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
  2024-05-29  2:01 ` Bjorn Andersson
  4 siblings, 1 reply; 11+ 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

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 7b9e0ad1ecaa..8b82c45d1a48 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
           - qcom,pmi8994-lpg
           - qcom,pmi8998-lpg
           - qcom,pmk8550-pwm
@@ -146,6 +147,7 @@ allOf:
               - qcom,pm8941-lpg
               - qcom,pm8994-lpg
               - qcom,pmc8180c-lpg
+              - qcom,pmi8950-pwm
               - qcom,pmi8994-lpg
               - qcom,pmi8998-lpg
               - qcom,pmk8550-pwm
@@ -294,5 +296,3 @@ examples:
         label = "blue";
       };
     };
-
-...

-- 
2.44.0


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

* Re: [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
  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
  0 siblings, 0 replies; 11+ messages in thread
From: Conor Dooley @ 2024-04-02 17:54 UTC (permalink / raw)
  To: Gianluca Boiano
  Cc: Pavel Machek, Lee Jones, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-leds,
	linux-kernel, linux-arm-msm, devicetree

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

On Tue, Apr 02, 2024 at 02:35:44PM +0200, Gianluca Boiano wrote:
> Update leds-qcom-lpg binding to support PMI8950 PWM.
> 
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 1/3] leds: qcom-lpg: Add support for PMI8950 PWM
  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
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2024-04-10 18:14 UTC (permalink / raw)
  To: Gianluca Boiano, Pavel Machek, Lee Jones, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-leds, linux-kernel, linux-arm-msm, devicetree



On 4/2/24 14:35, Gianluca Boiano wrote:
> The PMI8950 PMIC contains 1 PWM channel
> 
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Oddly enough, there's also 1 LPG channel on the PM(not I)8950 @ 0xbc00

Konrad

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

* Re: [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node
  2024-04-02 12:35 ` [PATCH 2/3] arm64: dts: qcom: pmi8950: add pwm node Gianluca Boiano
@ 2024-04-10 18:14   ` Konrad Dybcio
  0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2024-04-10 18:14 UTC (permalink / raw)
  To: Gianluca Boiano, Pavel Machek, Lee Jones, Bjorn Andersson,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-leds, linux-kernel, linux-arm-msm, devicetree



On 4/2/24 14:35, Gianluca Boiano wrote:
> This node is actually found on some msm8953 devices (xiaomi-mido) and
> allows irled enablement
> 
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: (subset) [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg.
  2024-04-02 12:35 [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg Gianluca Boiano
                   ` (2 preceding siblings ...)
  2024-04-02 12:35 ` [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM Gianluca Boiano
@ 2024-04-11 16:46 ` Lee Jones
  2024-05-29  2:01 ` Bjorn Andersson
  4 siblings, 0 replies; 11+ messages in thread
From: Lee Jones @ 2024-04-11 16:46 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Gianluca Boiano
  Cc: linux-leds, linux-kernel, linux-arm-msm, devicetree

On Tue, 02 Apr 2024 14:35:41 +0200, Gianluca Boiano wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/3] leds: qcom-lpg: Add support for PMI8950 PWM
      commit: 945d4f9fc2123ce2ca4f72fd83b61842bc0191fe
[3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
      commit: 4bac069633d433a8626b0c80a3f191800086e77f

--
Lee Jones [李琼斯]


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

* Re: (subset) [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg.
  2024-04-02 12:35 [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg Gianluca Boiano
                   ` (3 preceding siblings ...)
  2024-04-11 16:46 ` (subset) [PATCH 0/3] This patch series introduces support for PMI8950 PWM in leds-qcom-lpg Lee Jones
@ 2024-05-29  2:01 ` Bjorn Andersson
  4 siblings, 0 replies; 11+ messages in thread
From: Bjorn Andersson @ 2024-05-29  2:01 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Gianluca Boiano
  Cc: linux-leds, linux-kernel, linux-arm-msm, devicetree


On Tue, 02 Apr 2024 14:35:41 +0200, Gianluca Boiano wrote:
> 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.
> 
> [...]

Applied, thanks!

[2/3] arm64: dts: qcom: pmi8950: add pwm node
      commit: 62aad66b57466287925d17e7ed0f6f14fd6c5459

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

* Re: [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
  2024-02-26 10:57   ` [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: " Gianluca Boiano
@ 2024-02-26 12:37     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-26 12:37 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 26/02/2024 11:57, Gianluca Boiano wrote:
> Update leds-qcom-lpg binding to support PMI8950 PWM.
> 
> Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
> ---
> Changes:

Three different patchsets, two with random versioning, all attached to
one thread.

Sorry, that's just confusing.
1. Version your patchsets.
2. Send them as separate thread.

Just use b4 and avoid half of review complains...

Best regards,
Krzysztof


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

* [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: Add support for PMI8950 PWM
  2024-02-26 10:57 ` [PATCH 1/3] leds: qcom-lpg: " Gianluca Boiano
@ 2024-02-26 10:57   ` Gianluca Boiano
  2024-02-26 12:37     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 11+ messages in thread
From: Gianluca Boiano @ 2024-02-26 10:57 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

Update leds-qcom-lpg binding to support PMI8950 PWM.

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
Changes:
- Add missing entry for if
- Rebase on top of https://lore.kernel.org/linux-devicetree/20240226073713.19045-1-krzysztof.kozlowski@linaro.org/T/#t
---
 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 6649ca2ec805..e93e9b30660b 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
           - qcom,pmi8994-lpg
           - qcom,pmi8998-lpg
           - qcom,pmk8550-pwm
@@ -148,6 +149,7 @@ allOf:
             enum:
               - qcom,pm8350c-pwm
               - qcom,pm8550-pwm
+              - qcom,pmi8950-pwm
     then:
       properties:
         nvmem:
-- 
2.44.0


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

end of thread, other threads:[~2024-05-29  2:02 UTC | newest]

Thread overview: 11+ 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
2024-05-29  2:01 ` Bjorn Andersson
  -- 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-26 10:57   ` [PATCH 3/3] dt-bindings: leds: leds-qcom-lpg: " Gianluca Boiano
2024-02-26 12:37     ` Krzysztof Kozlowski

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