diff mbox series

[v5,1/2] soundwire: qcom: Add compatible name for v1.6.0

Message ID 1646030377-12092-2-git-send-email-quic_srivasam@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add support for SoundWire1.6 audio cgcr register control | expand

Commit Message

Srinivasa Rao Mandadapu Feb. 28, 2022, 6:39 a.m. UTC
Update compatible string and master data information in soundwire driver
to support v1.6.0 in lpass sc7280 based platform.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
---
 drivers/soundwire/qcom.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Stephen Boyd Feb. 28, 2022, 9:02 p.m. UTC | #1
Quoting Srinivasa Rao Mandadapu (2022-02-27 22:39:36)
> Update compatible string and master data information in soundwire driver
> to support v1.6.0 in lpass sc7280 based platform.
>
> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
> ---
>  drivers/soundwire/qcom.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index 9eb31ba..fb183bd 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -175,6 +175,11 @@ static struct qcom_swrm_data swrm_v1_5_data = {
>         .default_cols = 16,
>  };
>
> +static struct qcom_swrm_data swrm_v1_6_data = {

Why not const?

> +       .default_rows = 50,
> +       .default_cols = 16,

This is the same as swrm_v1_5_data so just use that struct again?

> +};
> +
>  #define to_qcom_sdw(b) container_of(b, struct qcom_swrm_ctrl, bus)
>
>  static int qcom_swrm_ahb_reg_read(struct qcom_swrm_ctrl *ctrl, int reg,
> @@ -1343,6 +1348,7 @@ static int qcom_swrm_remove(struct platform_device *pdev)
>  static const struct of_device_id qcom_swrm_of_match[] = {
>         { .compatible = "qcom,soundwire-v1.3.0", .data = &swrm_v1_3_data },
>         { .compatible = "qcom,soundwire-v1.5.1", .data = &swrm_v1_5_data },

These other structs for v1.5 and v1.3 could also be const.

> +       { .compatible = "qcom,soundwire-v1.6.0", .data = &swrm_v1_6_data },
>         {/* sentinel */},
Srinivasa Rao Mandadapu March 1, 2022, 3:44 p.m. UTC | #2
On 3/1/2022 2:32 AM, Stephen Boyd wrote:
> Quoting Srinivasa Rao Mandadapu (2022-02-27 22:39:36)
>> Update compatible string and master data information in soundwire driver
>> to support v1.6.0 in lpass sc7280 based platform.
>>
>> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
>> Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
>> Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
>> ---
>>   drivers/soundwire/qcom.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
>> index 9eb31ba..fb183bd 100644
>> --- a/drivers/soundwire/qcom.c
>> +++ b/drivers/soundwire/qcom.c
>> @@ -175,6 +175,11 @@ static struct qcom_swrm_data swrm_v1_5_data = {
>>          .default_cols = 16,
>>   };
>>
>> +static struct qcom_swrm_data swrm_v1_6_data = {
> Why not const?
Okay.
>
>> +       .default_rows = 50,
>> +       .default_cols = 16,
> This is the same as swrm_v1_5_data so just use that struct again?
Okay. Will useĀ  swrm_v1_5_data.
>
>> +};
>> +
>>   #define to_qcom_sdw(b) container_of(b, struct qcom_swrm_ctrl, bus)
>>
>>   static int qcom_swrm_ahb_reg_read(struct qcom_swrm_ctrl *ctrl, int reg,
>> @@ -1343,6 +1348,7 @@ static int qcom_swrm_remove(struct platform_device *pdev)
>>   static const struct of_device_id qcom_swrm_of_match[] = {
>>          { .compatible = "qcom,soundwire-v1.3.0", .data = &swrm_v1_3_data },
>>          { .compatible = "qcom,soundwire-v1.5.1", .data = &swrm_v1_5_data },
> These other structs for v1.5 and v1.3 could also be const.
Okay. Will add const and re post.
>
>> +       { .compatible = "qcom,soundwire-v1.6.0", .data = &swrm_v1_6_data },
>>          {/* sentinel */},
diff mbox series

Patch

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 9eb31ba..fb183bd 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -175,6 +175,11 @@  static struct qcom_swrm_data swrm_v1_5_data = {
 	.default_cols = 16,
 };
 
+static struct qcom_swrm_data swrm_v1_6_data = {
+	.default_rows = 50,
+	.default_cols = 16,
+};
+
 #define to_qcom_sdw(b)	container_of(b, struct qcom_swrm_ctrl, bus)
 
 static int qcom_swrm_ahb_reg_read(struct qcom_swrm_ctrl *ctrl, int reg,
@@ -1343,6 +1348,7 @@  static int qcom_swrm_remove(struct platform_device *pdev)
 static const struct of_device_id qcom_swrm_of_match[] = {
 	{ .compatible = "qcom,soundwire-v1.3.0", .data = &swrm_v1_3_data },
 	{ .compatible = "qcom,soundwire-v1.5.1", .data = &swrm_v1_5_data },
+	{ .compatible = "qcom,soundwire-v1.6.0", .data = &swrm_v1_6_data },
 	{/* sentinel */},
 };