2021-10-29 11:46:47

by Satya Priya

[permalink] [raw]
Subject: [PATCH V3 0/4] Add PM8350C PMIC PWM support for backlight

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

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


2021-10-29 11:46:48

by Satya Priya

[permalink] [raw]
Subject: [PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support

From: satya priya <[email protected]>

Add pm8350c pmic pwm support.

Signed-off-by: satya priya <[email protected]>
Reviewed-by: Matthias Kaehlcke <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
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

2021-10-29 11:46:59

by Satya Priya

[permalink] [raw]
Subject: [PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver

From: satya priya <[email protected]>

Add pm8350c compatible and lpg_data to the driver.

Signed-off-by: satya priya <[email protected]>
Reviewed-by: Matthias Kaehlcke <[email protected]>
---
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

2021-10-29 11:47:05

by Satya Priya

[permalink] [raw]
Subject: [PATCH V3 3/4] arm64: dts: qcom: pm8350c: Add pwm support

From: satya priya <[email protected]>

Add pwm support for PM8350C pmic.

Signed-off-by: satya priya <[email protected]>
---
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

2021-10-29 11:48:32

by Satya Priya

[permalink] [raw]
Subject: [PATCH V3 4/4] arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2

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

Signed-off-by: Satya Priya <[email protected]>
---
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

2021-10-29 17:26:52

by Trilok Soni

[permalink] [raw]
Subject: Re: [PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver

On 10/29/2021 4:44 AM, Satya Priya wrote:
> From: satya priya <[email protected]>
>
> Add pm8350c compatible and lpg_data to the driver.
>
> Signed-off-by: satya priya <[email protected]>

Similar comment like earlier patch.

---Trilok Soni

2021-10-29 17:27:22

by Trilok Soni

[permalink] [raw]
Subject: Re: [PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support

On 10/29/2021 4:44 AM, Satya Priya wrote:
> From: satya priya <[email protected]>
>
> Add pm8350c pmic pwm support.
>
> Signed-off-by: satya priya <[email protected]>

If you are sending email form [email protected] then can you
please use the same email for SOB as well?


> Reviewed-by: Matthias Kaehlcke <[email protected]>
> Reviewed-by: Stephen Boyd <[email protected]>
> Acked-by: Rob Herring <[email protected]>
> ---
> 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
>

2021-10-29 19:05:19

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver

Quoting Satya Priya (2021-10-29 04:44:51)
> From: satya priya <[email protected]>
>
> Add pm8350c compatible and lpg_data to the driver.
>
> Signed-off-by: satya priya <[email protected]>
> Reviewed-by: Matthias Kaehlcke <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2021-10-29 19:06:21

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH V3 3/4] arm64: dts: qcom: pm8350c: Add pwm support

Quoting Satya Priya (2021-10-29 04:44:52)
> From: satya priya <[email protected]>
>
> Add pwm support for PM8350C pmic.
>
> Signed-off-by: satya priya <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2021-10-29 19:06:24

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH V3 4/4] arm64: dts: qcom: Enable pm8350c pwm for sc7280-idp2

Quoting Satya Priya (2021-10-29 04:44:53)
> Enable pm8350c pmic pwm support for backlight on sc7280-idp2.
>
> Signed-off-by: Satya Priya <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2021-11-26 08:59:47

by Satya Priya

[permalink] [raw]
Subject: Re: [PATCH V3 1/4] dt-bindings: leds: Add pm8350c pmic support


On 10/29/2021 10:53 PM, Trilok Soni wrote:
> On 10/29/2021 4:44 AM, Satya Priya wrote:
>> From: satya priya <[email protected]>
>>
>> Add pm8350c pmic pwm support.
>>
>> Signed-off-by: satya priya <[email protected]>
>
> If you are sending email form [email protected] then can you
> please use the same email for SOB as well?
>

Okay, I'll resend the V3 by changing SOB.


>
>> Reviewed-by: Matthias Kaehlcke <[email protected]>
>> Reviewed-by: Stephen Boyd <[email protected]>
>> Acked-by: Rob Herring <[email protected]>
>> ---
>> 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
>>

2022-02-17 23:24:48

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver

On Fri 29 Oct 04:44 PDT 2021, Satya Priya wrote:

> From: satya priya <[email protected]>
>
> Add pm8350c compatible and lpg_data to the driver.
>
> Signed-off-by: satya priya <[email protected]>

Sorry for the OCD, but I would really like for you to capitalize 's' and
'p' in your name.

> Reviewed-by: Matthias Kaehlcke <[email protected]>
> ---
> 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),

As you might have seen in v12 I dropped pwm_9bit_mask.

> +

Afaict there's a tri-channel current sink in pm8350c as well, so you
should have:

.triled_base = 0xef00,

And then associated .triled_mask in the relevant channels.

Regards,
Bjorn

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

2022-02-22 06:00:02

by Satya Priya

[permalink] [raw]
Subject: Re: [PATCH V3 2/4] leds: Add pm8350c support to Qualcomm LPG driver

On 2/18/2022 3:56 AM, Bjorn Andersson wrote:

> On Fri 29 Oct 04:44 PDT 2021, Satya Priya wrote:
>
>> From: satya priya <[email protected]>
>>
>> Add pm8350c compatible and lpg_data to the driver.
>>
>> Signed-off-by: satya priya <[email protected]>
> Sorry for the OCD, but I would really like for you to capitalize 's' and
> 'p' in your name.


I had corrected this in the v3-resend version.

https://patchwork.kernel.org/project/linux-arm-msm/patch/[email protected]/


>
>> Reviewed-by: Matthias Kaehlcke <[email protected]>
>> ---
>> 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),
> As you might have seen in v12 I dropped pwm_9bit_mask.


Yeah, I'll drop this.


>> +
> Afaict there's a tri-channel current sink in pm8350c as well, so you
> should have:
>
> .triled_base = 0xef00,
>
> And then associated .triled_mask in the relevant channels.


Okay, I'll add them.


> Regards,
> Bjorn
>
>> + .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
>>