* [PATCH V2 0/3] Add PM8350C PMIC PWM support for backlight
@ 2021-10-19 10:48 Satya Priya
2021-10-19 10:48 ` [PATCH V2 1/3] dt-bindings: leds: Add pm8350c pmic support Satya Priya
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Satya Priya @ 2021-10-19 10:48 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Bjorn Andersson, Andy Gross
Cc: Matthias Kaehlcke, swboyd, linux-leds, devicetree, linux-kernel,
linux-arm-msm, Satya Priya
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 (3):
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 | 6 ++++++
drivers/leds/rgb/leds-qcom-lpg.c | 10 ++++++++++
3 files changed, 17 insertions(+)
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH V2 1/3] dt-bindings: leds: Add pm8350c pmic support
2021-10-19 10:48 [PATCH V2 0/3] Add PM8350C PMIC PWM support for backlight Satya Priya
@ 2021-10-19 10:48 ` Satya Priya
2021-10-19 10:48 ` [PATCH V2 2/3] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
2021-10-19 10:48 ` [PATCH V2 3/3] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
2 siblings, 0 replies; 6+ messages in thread
From: Satya Priya @ 2021-10-19 10:48 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Bjorn Andersson, Andy Gross
Cc: Matthias Kaehlcke, swboyd, linux-leds, devicetree, linux-kernel,
linux-arm-msm, satya priya
From: satya priya <skakit@codeaurora.org>
Add pm8350c pmic pwm support.
Signed-off-by: satya priya <skakit@codeaurora.org>
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.
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
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH V2 2/3] leds: Add pm8350c support to Qualcomm LPG driver
2021-10-19 10:48 [PATCH V2 0/3] Add PM8350C PMIC PWM support for backlight Satya Priya
2021-10-19 10:48 ` [PATCH V2 1/3] dt-bindings: leds: Add pm8350c pmic support Satya Priya
@ 2021-10-19 10:48 ` Satya Priya
2021-10-22 17:22 ` Bjorn Andersson
2021-10-19 10:48 ` [PATCH V2 3/3] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
2 siblings, 1 reply; 6+ messages in thread
From: Satya Priya @ 2021-10-19 10:48 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Bjorn Andersson, Andy Gross
Cc: Matthias Kaehlcke, swboyd, linux-leds, devicetree, linux-kernel,
linux-arm-msm, satya priya
From: satya priya <skakit@codeaurora.org>
Add pm8350c compatible and lpg_data to the driver.
Signed-off-by: satya priya <skakit@codeaurora.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in V2:
- Added const for lpg_channel_data[] struct.
drivers/leds/rgb/leds-qcom-lpg.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 45ef4ec..99235af 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1275,9 +1275,19 @@ static const struct lpg_data pm8150l_lpg_data = {
},
};
+static const struct lpg_data pm8350c_pwm_data = {
+ .pwm_9bit_mask = BIT(2),
+
+ .num_channels = 1,
+ .channels = (const struct lpg_channel_data[]) {
+ { .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 },
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH V2 3/3] arm64: dts: qcom: pm8350c: Add pwm support
2021-10-19 10:48 [PATCH V2 0/3] Add PM8350C PMIC PWM support for backlight Satya Priya
2021-10-19 10:48 ` [PATCH V2 1/3] dt-bindings: leds: Add pm8350c pmic support Satya Priya
2021-10-19 10:48 ` [PATCH V2 2/3] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
@ 2021-10-19 10:48 ` Satya Priya
2021-10-20 4:27 ` Stephen Boyd
2 siblings, 1 reply; 6+ messages in thread
From: Satya Priya @ 2021-10-19 10:48 UTC (permalink / raw)
To: Pavel Machek, Rob Herring, Bjorn Andersson, Andy Gross
Cc: Matthias Kaehlcke, swboyd, linux-leds, devicetree, linux-kernel,
linux-arm-msm, satya priya
From: satya priya <skakit@codeaurora.org>
Add pwm support for PM8350C pmic.
Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V2:
- Dropped suffix '4' from pwm phandle and removed "status=ok".
arch/arm64/boot/dts/qcom/pm8350c.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
index e1b75ae..08fc0a8 100644
--- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi
+++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
@@ -29,6 +29,12 @@
interrupt-controller;
#interrupt-cells = <2>;
};
+
+ pm8350c_pwm: pwm {
+ compatible = "qcom,pm8350c-pwm";
+ #pwm-cells = <2>;
+ status = "disabled";
+ };
};
};
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V2 3/3] arm64: dts: qcom: pm8350c: Add pwm support
2021-10-19 10:48 ` [PATCH V2 3/3] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
@ 2021-10-20 4:27 ` Stephen Boyd
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2021-10-20 4:27 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Pavel Machek, Rob Herring, Satya Priya
Cc: Matthias Kaehlcke, linux-leds, devicetree, linux-kernel, linux-arm-msm
Quoting Satya Priya (2021-10-19 03:48:51)
> From: satya priya <skakit@codeaurora.org>
>
> Add pwm support for PM8350C pmic.
>
> Signed-off-by: satya priya <skakit@codeaurora.org>
> ---
> Changes in V2:
> - Dropped suffix '4' from pwm phandle and removed "status=ok".
>
> arch/arm64/boot/dts/qcom/pm8350c.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pm8350c.dtsi b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
> index e1b75ae..08fc0a8 100644
> --- a/arch/arm64/boot/dts/qcom/pm8350c.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm8350c.dtsi
> @@ -29,6 +29,12 @@
> interrupt-controller;
> #interrupt-cells = <2>;
> };
> +
> + pm8350c_pwm: pwm {
> + compatible = "qcom,pm8350c-pwm";
It should have a reg property. Every node should have a single cell for
the reg property because the parent has #address-cells = <1>
> + #pwm-cells = <2>;
> + status = "disabled";
> + };
> };
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2 2/3] leds: Add pm8350c support to Qualcomm LPG driver
2021-10-19 10:48 ` [PATCH V2 2/3] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
@ 2021-10-22 17:22 ` Bjorn Andersson
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2021-10-22 17:22 UTC (permalink / raw)
To: Satya Priya
Cc: Pavel Machek, Rob Herring, Andy Gross, Matthias Kaehlcke, swboyd,
linux-leds, devicetree, linux-kernel, linux-arm-msm
On Tue 19 Oct 03:48 PDT 2021, Satya Priya wrote:
> From: satya priya <skakit@codeaurora.org>
>
> Add pm8350c compatible and lpg_data to the driver.
>
> Signed-off-by: satya priya <skakit@codeaurora.org>
> Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> Changes in V2:
> - Added const for lpg_channel_data[] struct.
>
> drivers/leds/rgb/leds-qcom-lpg.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
> index 45ef4ec..99235af 100644
> --- a/drivers/leds/rgb/leds-qcom-lpg.c
> +++ b/drivers/leds/rgb/leds-qcom-lpg.c
> @@ -1275,9 +1275,19 @@ static const struct lpg_data pm8150l_lpg_data = {
> },
> };
>
> +static const struct lpg_data pm8350c_pwm_data = {
> + .pwm_9bit_mask = BIT(2),
> +
> + .num_channels = 1,
No, this should be 4. The fact that you only care about the first
channel in your product should be reflected in the dts, not in the
driver.
Thanks,
Bjorn
> + .channels = (const struct lpg_channel_data[]) {
> + { .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 },
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-22 17:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 10:48 [PATCH V2 0/3] Add PM8350C PMIC PWM support for backlight Satya Priya
2021-10-19 10:48 ` [PATCH V2 1/3] dt-bindings: leds: Add pm8350c pmic support Satya Priya
2021-10-19 10:48 ` [PATCH V2 2/3] leds: Add pm8350c support to Qualcomm LPG driver Satya Priya
2021-10-22 17:22 ` Bjorn Andersson
2021-10-19 10:48 ` [PATCH V2 3/3] arm64: dts: qcom: pm8350c: Add pwm support Satya Priya
2021-10-20 4:27 ` Stephen Boyd
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).