diff mbox series

[v3,1/5] ASoC: dt-bindings: Add bindings for wcd937x static channel mapping

Message ID 20241126164300.3305903-2-quic_mohs@quicinc.com
State New
Headers show
Series Add static channel mapping between soundwire master and slave | expand

Commit Message

Mohammad Rafi Shaik Nov. 26, 2024, 4:42 p.m. UTC
Add wcd937x static channel mapping values to avoid
having to use unclear number indices in device trees.

Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
---
 include/dt-bindings/sound/qcom,wcd93xx.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 include/dt-bindings/sound/qcom,wcd93xx.h

Comments

Krzysztof Kozlowski Nov. 27, 2024, 8:05 a.m. UTC | #1
On Tue, Nov 26, 2024 at 10:12:56PM +0530, Mohammad Rafi Shaik wrote:
> Add wcd937x static channel mapping values to avoid
> having to use unclear number indices in device trees.
> 
> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
> ---
>  include/dt-bindings/sound/qcom,wcd93xx.h | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>  create mode 100644 include/dt-bindings/sound/qcom,wcd93xx.h
> 
> diff --git a/include/dt-bindings/sound/qcom,wcd93xx.h b/include/dt-bindings/sound/qcom,wcd93xx.h
> new file mode 100644
> index 000000000000..45bcc30d0393
> --- /dev/null
> +++ b/include/dt-bindings/sound/qcom,wcd93xx.h

Filename matching compatible, always.

> @@ -0,0 +1,13 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#ifndef __DT_SOUND_QCOM_WCD93xx_H
> +#define __DT_SOUND_QCOM_WCD93xx_H
> +
> +#define SWRM_CH1 1
> +#define SWRM_CH2 2
> +#define SWRM_CH3 4
> +#define SWRM_CH4 8

Bindings define interface between driver and DTS. The values are
abstract, so alwys start from 0 or 1 and are incremented by 1, not by
power of 2. Also missing some sort of prefix, w.g. WCD9390_xxx

Anyway, this does not look like binding.

Best regards,
Krzysztof
Mohammad Rafi Shaik Dec. 3, 2024, 4:52 a.m. UTC | #2
On 11/27/2024 1:35 PM, Krzysztof Kozlowski wrote:
> On Tue, Nov 26, 2024 at 10:12:56PM +0530, Mohammad Rafi Shaik wrote:
>> Add wcd937x static channel mapping values to avoid
>> having to use unclear number indices in device trees.
>>
>> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com>
>> ---
>>   include/dt-bindings/sound/qcom,wcd93xx.h | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>   create mode 100644 include/dt-bindings/sound/qcom,wcd93xx.h
>>
>> diff --git a/include/dt-bindings/sound/qcom,wcd93xx.h b/include/dt-bindings/sound/qcom,wcd93xx.h
>> new file mode 100644
>> index 000000000000..45bcc30d0393
>> --- /dev/null
>> +++ b/include/dt-bindings/sound/qcom,wcd93xx.h
> 
> Filename matching compatible, always.
> 
>> @@ -0,0 +1,13 @@
>> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#ifndef __DT_SOUND_QCOM_WCD93xx_H
>> +#define __DT_SOUND_QCOM_WCD93xx_H
>> +
>> +#define SWRM_CH1 1
>> +#define SWRM_CH2 2
>> +#define SWRM_CH3 4
>> +#define SWRM_CH4 8
> 
> Bindings define interface between driver and DTS. The values are
> abstract, so alwys start from 0 or 1 and are incremented by 1, not by
> power of 2. Also missing some sort of prefix, w.g. WCD9390_xxx
> 
> Anyway, this does not look like binding.
> 

Ack,

Will add the Prefix WCD9370_SWRM_CH1,


Added new binding support header file 
(include/dt-bindings/sound/qcom,wcd93xx.h) for providing channel mapping 
values to avoid having
to use unclear number indices in device trees.

> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/include/dt-bindings/sound/qcom,wcd93xx.h b/include/dt-bindings/sound/qcom,wcd93xx.h
new file mode 100644
index 000000000000..45bcc30d0393
--- /dev/null
+++ b/include/dt-bindings/sound/qcom,wcd93xx.h
@@ -0,0 +1,13 @@ 
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef __DT_SOUND_QCOM_WCD93xx_H
+#define __DT_SOUND_QCOM_WCD93xx_H
+
+#define SWRM_CH1 1
+#define SWRM_CH2 2
+#define SWRM_CH3 4
+#define SWRM_CH4 8
+
+#endif