linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight
@ 2021-11-26  9:11 Satya Priya
  2021-11-26  9:11 ` [RESEND PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support Satya Priya
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Satya Priya @ 2021-11-26  9:11 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, quic_tsoni, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, Satya Priya

Hi,

I'm resending this version after correcting SOB.

This series depends on [1], which adds driver for Qualcomm LPG.

[1] https://patchwork.kernel.org/project/linux-arm-msm/list/?series=560587&state=%2A&archive=both

Satya Priya (1):
  arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2
  dt-bindings: leds: Add pm8350c pmic support
  leds: Add pm8350c support to Qualcomm LPG driver
  arm64: dts: qcom: pm8350c: Add pwm support

 Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml |  1 +
 arch/arm64/boot/dts/qcom/pm8350c.dtsi                     |  7 +++++++
 arch/arm64/boot/dts/qcom/sc7280-idp2.dts                  |  4 ++++
 drivers/leds/rgb/leds-qcom-lpg.c                          | 13 +++++++++++++
 4 files changed, 25 insertions(+)

-- 
2.7.4


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

* [RESEND PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support
  2021-11-26  9:11 [RESEND PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight Satya Priya
@ 2021-11-26  9:11 ` Satya Priya
  2021-11-26  9:11 ` [RESEND PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Satya Priya @ 2021-11-26  9:11 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, quic_tsoni, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, Satya Priya

Add pm8350c pmic pwm support.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Acked-by: Rob Herring <robh@kernel.org>
---
Changes in V2:
 - No changes.

Changes in V3:
 - No changes.

 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 336bd8e..409a4c7 100644
--- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
@@ -19,6 +19,7 @@ properties:
     enum:
       - qcom,pm8150b-lpg
       - qcom,pm8150l-lpg
+      - qcom,pm8350c-pwm
       - qcom,pm8916-pwm
       - qcom,pm8941-lpg
       - qcom,pm8994-lpg
-- 
2.7.4


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

* [RESEND PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver
  2021-11-26  9:11 [RESEND PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight Satya Priya
  2021-11-26  9:11 ` [RESEND PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support Satya Priya
@ 2021-11-26  9:11 ` Satya Priya
  2021-11-26  9:11 ` [RESEND PATCH V3 3/4] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
  2021-11-26  9:12 ` [RESEND PATCH V3 4/4] arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2 Satya Priya
  3 siblings, 0 replies; 5+ messages in thread
From: Satya Priya @ 2021-11-26  9:11 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, quic_tsoni, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, Satya Priya

Add pm8350c compatible and lpg_data to the driver.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
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


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

* [RESEND PATCH V3 3/4] arm64: dts: qcom: pm8350c: Add pwm support
  2021-11-26  9:11 [RESEND PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight Satya Priya
  2021-11-26  9:11 ` [RESEND PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support Satya Priya
  2021-11-26  9:11 ` [RESEND PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
@ 2021-11-26  9:11 ` Satya Priya
  2021-11-26  9:12 ` [RESEND PATCH V3 4/4] arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2 Satya Priya
  3 siblings, 0 replies; 5+ messages in thread
From: Satya Priya @ 2021-11-26  9:11 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, quic_tsoni, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, Satya Priya

Add pwm support for PM8350C pmic.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
Changes in V2:
 - Dropped suffix '4' from pwm phandle and removed "status=ok".

Changes in V3:
  - Add reg property.

 arch/arm64/boot/dts/qcom/pm8350c.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
index e1b75ae..1ba6318 100644
--- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
@@ -29,6 +29,13 @@
 			interrupt-controller;
 			#interrupt-cells = <2>;
 		};
+
+		pm8350c_pwm: pwm@e800 {
+			compatible = "qcom,pm8350c-pwm";
+			reg = <0xe800>;
+			#pwm-cells = <2>;
+			status = "disabled";
+		};
 	};
 };
 
-- 
2.7.4


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

* [RESEND PATCH V3 4/4] arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2
  2021-11-26  9:11 [RESEND PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight Satya Priya
                   ` (2 preceding siblings ...)
  2021-11-26  9:11 ` [RESEND PATCH V3 3/4] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
@ 2021-11-26  9:12 ` Satya Priya
  3 siblings, 0 replies; 5+ messages in thread
From: Satya Priya @ 2021-11-26  9:12 UTC (permalink / raw)
  To: Pavel Machek, Rob Herring, Bjorn Andersson
  Cc: Stephen Boyd, Matthias Kaehlcke, quic_tsoni, linux-leds,
	devicetree, linux-kernel, linux-arm-msm, Satya Priya

Enable pm8350c pmic pwm support for backlight on sc7280-idp2.

Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
---
Changes in V3:
 - New patch added in V3, to enable pwm support on sc7280-idp2 board.

 arch/arm64/boot/dts/qcom/sc7280-idp2.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp2.dts b/arch/arm64/boot/dts/qcom/sc7280-idp2.dts
index 3ae9969..07ca295 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp2.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp2.dts
@@ -29,3 +29,7 @@
 &nvme_3v3_regulator {
 	gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>;
 };
+
+&pm8350c_pwm {
+	status = "okay";
+};
-- 
2.7.4


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

end of thread, other threads:[~2021-11-26  9:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26  9:11 [RESEND PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight Satya Priya
2021-11-26  9:11 ` [RESEND PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support Satya Priya
2021-11-26  9:11 ` [RESEND PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
2021-11-26  9:11 ` [RESEND PATCH V3 3/4] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
2021-11-26  9:12 ` [RESEND PATCH V3 4/4] arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2 Satya Priya

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