diff mbox series

[v2,10/15] ASoC: dt-bindings: rockchip: i2s: Document property for playback/capture

Message ID 1629796682-4170-5-git-send-email-sugar.zhang@rock-chips.com (mailing list archive)
State New, archived
Headers show
Series Patches to update for rockchip i2s | expand

Commit Message

Sugar Zhang Aug. 24, 2021, 9:17 a.m. UTC
This patch documents property for playback-only and capture-only.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---

Changes in v2: None

 Documentation/devicetree/bindings/sound/rockchip-i2s.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Rob Herring Aug. 24, 2021, 5:06 p.m. UTC | #1
On Tue, Aug 24, 2021 at 05:17:57PM +0800, Sugar Zhang wrote:
> This patch documents property for playback-only and capture-only.
> 
> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
> ---
> 
> Changes in v2: None
> 
>  Documentation/devicetree/bindings/sound/rockchip-i2s.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
> index 9f9cc48..005b6e6 100644
> --- a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
> +++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
> @@ -81,6 +81,16 @@ properties:
>      description:
>        Max playback channels, if not set, 8 channels default.
>  
> +  rockchip,capture-only:
> +    type: boolean
> +    description:
> +      Specify that the controller has capture only capability.
> +
> +  rockchip,playback-only:
> +    type: boolean
> +    description:
> +      Specify that the controller has playback only capability.

In the Rockchip TDM-I2S binding[1], these were dropped. Perhaps comment 
there why they are needed.

Rob

[1] https://lore.kernel.org/lkml/20210820182731.29370-1-frattaroli.nicolas@gmail.com/
Sugar Zhang Aug. 25, 2021, 9:30 a.m. UTC | #2
Hi Rob,

On 2021/8/25 1:06, Rob Herring wrote:
> On Tue, Aug 24, 2021 at 05:17:57PM +0800, Sugar Zhang wrote:
>> This patch documents property for playback-only and capture-only.
>>
>> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
>> ---
>>
>> Changes in v2: None
>>
>>   Documentation/devicetree/bindings/sound/rockchip-i2s.yaml | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
>> index 9f9cc48..005b6e6 100644
>> --- a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
>> +++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
>> @@ -81,6 +81,16 @@ properties:
>>       description:
>>         Max playback channels, if not set, 8 channels default.
>>   
>> +  rockchip,capture-only:
>> +    type: boolean
>> +    description:
>> +      Specify that the controller has capture only capability.
>> +
>> +  rockchip,playback-only:
>> +    type: boolean
>> +    description:
>> +      Specify that the controller has playback only capability.
> In the Rockchip TDM-I2S binding[1], these were dropped. Perhaps comment
> there why they are needed.

It was used to specify the controller capatiblity, some controller has 
capture or playback only.

maybe we can implement it by judge property 'dma-names'.  such as:

of_property_for_each_string(np, "dma-names", dma_names, name)

if (!strcmp(name, "tx"))

     has capture capability...

if (!strcmp(name, "rx"))

     has capture capability...

will do in v3.

>
> Rob
>
> [1] https://lore.kernel.org/lkml/20210820182731.29370-1-frattaroli.nicolas@gmail.com/
>
>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
index 9f9cc48..005b6e6 100644
--- a/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
+++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.yaml
@@ -81,6 +81,16 @@  properties:
     description:
       Max playback channels, if not set, 8 channels default.
 
+  rockchip,capture-only:
+    type: boolean
+    description:
+      Specify that the controller has capture only capability.
+
+  rockchip,playback-only:
+    type: boolean
+    description:
+      Specify that the controller has playback only capability.
+
   rockchip,grf:
     $ref: /schemas/types.yaml#/definitions/phandle
     description: