diff mbox series

[V3,2/4] leds: Add pm8350c support to Qualcomm LPG driver

Message ID 1635507893-25490-3-git-send-email-quic_c_skakit@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add PM8350C PMIC PWM support for backlight | expand

Commit Message

Satya Priya Kakitapalli (Temp) Oct. 29, 2021, 11:44 a.m. UTC
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.

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(+)

Comments

Trilok Soni Oct. 29, 2021, 5:23 p.m. UTC | #1
On 10/29/2021 4:44 AM, 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>

Similar comment like earlier patch.

---Trilok Soni
Stephen Boyd Oct. 29, 2021, 7:01 p.m. UTC | #2
Quoting Satya Priya (2021-10-29 04:44:51)
> 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>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Bjorn Andersson Feb. 17, 2022, 10:26 p.m. UTC | #3
On Fri 29 Oct 04:44 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>

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

> Reviewed-by: Matthias Kaehlcke <mka@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),

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
>
Satya Priya Kakitapalli (Temp) Feb. 22, 2022, 4:45 a.m. UTC | #4
On 2/18/2022 3:56 AM, Bjorn Andersson wrote:

> On Fri 29 Oct 04:44 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>
> 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/1637917920-22041-3-git-send-email-quic_c_skakit@quicinc.com/


>
>> Reviewed-by: Matthias Kaehlcke <mka@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),
> 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
>>
diff mbox series

Patch

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