diff mbox series

[v2,2/3] ASoC: tlv320adcx140: Add device tree property for PDM edges

Message ID 20200513200549.12213-2-dmurphy@ti.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] ASoC: tlv320adcx140: Add controls for PDM clk | expand

Commit Message

Dan Murphy May 13, 2020, 8:05 p.m. UTC
Add a device tree property to configure the PDM sampling edge for each
digital microphone.

CC: Rob Herring <robh@kernel.org>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 .../devicetree/bindings/sound/tlv320adcx140.yaml   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Ricard Wanderlof May 14, 2020, 8:09 a.m. UTC | #1
On Wed, 13 May 2020, Dan Murphy wrote:

> Add a device tree property to configure the PDM sampling edge for each
> digital microphone.
> 
> CC: Rob Herring <robh@kernel.org>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---
>  .../devicetree/bindings/sound/tlv320adcx140.yaml   | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
> b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
> index ab2268c0ee67..55668c7d261d 100644
> --- a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
> +++ b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
> @@ -63,6 +63,19 @@ properties:
>        - $ref: /schemas/types.yaml#/definitions/uint32
>        - enum: [0, 1, 2]
>  
> +  ti,pdm-edge-select:
> +    description: |
> +       Defines the sampling edge configuration for the PDM inputs.  This is
> an
> +       array defined as <PDMIN1 PDMIN2 PDMIN3 PDMIN4>. 0 (default) is
> negative
> +       sampling edge and 1 is positive sampling edge.

A bit of a nitpick, but I would think of the edges as 
negative-going/positive-going, or rising/falling. Not sure if anyone would 
misunderstand 'negative edge' in practice though.

> +    allOf:
> +      - $ref: /schemas/types.yaml#/definitions/uint32-array
> +      - minItems: 1
> +        maxItems: 4
> +        items:
> +          maximum: 1
> +        default: [0, 0, 0, 0]
> +
>  required:
>    - compatible
>    - reg
> @@ -77,6 +90,7 @@ examples:
>          compatible = "ti,tlv320adc5140";
>          reg = <0x4c>;
>          ti,mic-bias-source = <6>;
> +        ti,pdm-edge-select = < 0 1 0 1>;

Should there really be a space between < and 0 ?

/Ricard
Dan Murphy May 14, 2020, 12:09 p.m. UTC | #2
Richard

On 5/14/20 3:09 AM, Ricard Wanderlof wrote:
> On Wed, 13 May 2020, Dan Murphy wrote:
>
>> Add a device tree property to configure the PDM sampling edge for each
>> digital microphone.
>>
>> CC: Rob Herring <robh@kernel.org>
>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>> ---
>>   .../devicetree/bindings/sound/tlv320adcx140.yaml   | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
>> b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
>> index ab2268c0ee67..55668c7d261d 100644
>> --- a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
>> +++ b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
>> @@ -63,6 +63,19 @@ properties:
>>         - $ref: /schemas/types.yaml#/definitions/uint32
>>         - enum: [0, 1, 2]
>>   
>> +  ti,pdm-edge-select:
>> +    description: |
>> +       Defines the sampling edge configuration for the PDM inputs.  This is
>> an
>> +       array defined as <PDMIN1 PDMIN2 PDMIN3 PDMIN4>. 0 (default) is
>> negative
>> +       sampling edge and 1 is positive sampling edge.
> A bit of a nitpick, but I would think of the edges as
> negative-going/positive-going, or rising/falling. Not sure if anyone would
> misunderstand 'negative edge' in practice though.

I will re-write the description to be more descriptive.

>> +    allOf:
>> +      - $ref: /schemas/types.yaml#/definitions/uint32-array
>> +      - minItems: 1
>> +        maxItems: 4
>> +        items:
>> +          maximum: 1
>> +        default: [0, 0, 0, 0]
>> +
>>   required:
>>     - compatible
>>     - reg
>> @@ -77,6 +90,7 @@ examples:
>>           compatible = "ti,tlv320adc5140";
>>           reg = <0x4c>;
>>           ti,mic-bias-source = <6>;
>> +        ti,pdm-edge-select = < 0 1 0 1>;
> Should there really be a space between < and 0 ?

I will remove the space

Dan

>
> /Ricard
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
index ab2268c0ee67..55668c7d261d 100644
--- a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
+++ b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
@@ -63,6 +63,19 @@  properties:
       - $ref: /schemas/types.yaml#/definitions/uint32
       - enum: [0, 1, 2]
 
+  ti,pdm-edge-select:
+    description: |
+       Defines the sampling edge configuration for the PDM inputs.  This is an
+       array defined as <PDMIN1 PDMIN2 PDMIN3 PDMIN4>. 0 (default) is negative
+       sampling edge and 1 is positive sampling edge.
+    allOf:
+      - $ref: /schemas/types.yaml#/definitions/uint32-array
+      - minItems: 1
+        maxItems: 4
+        items:
+          maximum: 1
+        default: [0, 0, 0, 0]
+
 required:
   - compatible
   - reg
@@ -77,6 +90,7 @@  examples:
         compatible = "ti,tlv320adc5140";
         reg = <0x4c>;
         ti,mic-bias-source = <6>;
+        ti,pdm-edge-select = < 0 1 0 1>;
         reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
       };
     };