diff mbox series

[v9,2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

Message ID 1661872039-40174-1-git-send-email-fengzheng923@gmail.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

班涛 Aug. 30, 2022, 3:07 p.m. UTC
DT binding documentation for this new ASoC driver.

Signed-off-by: Ban Tao <fengzheng923@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
---
v1->v2:
1.Fix some build errors.

v2->v3:
1.Fix some build errors.

v3->v4:
1.None.

v4->v5:
1.Add interrupt.
2.Keep clock and reset index.

v5->v6:
1.None.

v6->v7:
1.None.

v7->v8:
1.Fix some build errors.

v8->v9:
1.None.
---
 .../bindings/sound/allwinner,sun50i-h6-dmic.yaml   | 79 ++++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml

Comments

Krzysztof Kozlowski Aug. 30, 2022, 5:35 p.m. UTC | #1
On 30/08/2022 18:07, Ban Tao wrote:
> DT binding documentation for this new ASoC driver.

Thank you for your patch. There is something to discuss/improve.

> 

>  .../bindings/sound/allwinner,sun50i-h6-dmic.yaml   | 79 ++++++++++++++++++++++
>  1 file changed, 79 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> new file mode 100644
> index 0000000..0cfc07f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> @@ -0,0 +1,79 @@
> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Allwinner H6 DMIC Device Tree Bindings

s/Device Tree Bindings//

> +
> +maintainers:
> +  - Ban Tao <fengzheng923@gmail.com>
> +
> +properties:
> +  "#sound-dai-cells":
> +    const: 0
> +
> +  compatible:
> +    const: allwinner,sun50i-h6-dmic

Put compatible first in the list of properties (also in required:).

Rest is ok, so keep the Rb-tags you already got.

Best regards,
Krzysztof
Mark Brown Aug. 30, 2022, 6:01 p.m. UTC | #2
On Tue, Aug 30, 2022 at 08:35:09PM +0300, Krzysztof Kozlowski wrote:
> On 30/08/2022 18:07, Ban Tao wrote:
> > DT binding documentation for this new ASoC driver.

> > +properties:
> > +  "#sound-dai-cells":
> > +    const: 0
> > +
> > +  compatible:
> > +    const: allwinner,sun50i-h6-dmic

> Put compatible first in the list of properties (also in required:).

Can the tooling be taught about this?
Krzysztof Kozlowski Aug. 30, 2022, 6:11 p.m. UTC | #3
On 30/08/2022 21:01, Mark Brown wrote:
> On Tue, Aug 30, 2022 at 08:35:09PM +0300, Krzysztof Kozlowski wrote:
>> On 30/08/2022 18:07, Ban Tao wrote:
>>> DT binding documentation for this new ASoC driver.
> 
>>> +properties:
>>> +  "#sound-dai-cells":
>>> +    const: 0
>>> +
>>> +  compatible:
>>> +    const: allwinner,sun50i-h6-dmic
> 
>> Put compatible first in the list of properties (also in required:).
> 
> Can the tooling be taught about this?

Probably could save me some time in writing reviews... Let me look.

Best regards,
Krzysztof
班涛 Sept. 7, 2022, 1:03 p.m. UTC | #4
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2022年8月31日周三 01:35写道:

> On 30/08/2022 18:07, Ban Tao wrote:
> > DT binding documentation for this new ASoC driver.
>
> Thank you for your patch. There is something to discuss/improve.
>
> >
>
> >  .../bindings/sound/allwinner,sun50i-h6-dmic.yaml   | 79
> ++++++++++++++++++++++
> >  1 file changed, 79 insertions(+)
> >  create mode 100644
> Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> >
> > diff --git
> a/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> > new file mode 100644
> > index 0000000..0cfc07f
> > --- /dev/null
> > +++
> b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> > @@ -0,0 +1,79 @@
> > +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Allwinner H6 DMIC Device Tree Bindings
>
> s/Device Tree Bindings//
>

So, modify it to 'Allwinner H6 DMIC Devices Tree Bindings', sure?

>
> > +
> > +maintainers:
> > +  - Ban Tao <fengzheng923@gmail.com>
> > +
> > +properties:
> > +  "#sound-dai-cells":
> > +    const: 0
> > +
> > +  compatible:
> > +    const: allwinner,sun50i-h6-dmic
>
> Put compatible first in the list of properties (also in required:).
>
> Rest is ok, so keep the Rb-tags you already got.
>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Sept. 8, 2022, 9:22 a.m. UTC | #5
On 07/09/2022 15:03, 班涛 wrote:
>>> +++
>> b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
>>> @@ -0,0 +1,79 @@
>>> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Allwinner H6 DMIC Device Tree Bindings
>>
>> s/Device Tree Bindings//
>>
> 
> So, modify it to 'Allwinner H6 DMIC Devices Tree Bindings', sure?

You pasted the same message, so what is the modification? I wrote you a
 search&replace pattern.



Best regards,
Krzysztof
班涛 Sept. 11, 2022, 6:18 a.m. UTC | #6
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2022年9月8日周四 17:22写道:

> On 07/09/2022 15:03, 班涛 wrote:
> >>> +++
> >> b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> >>> @@ -0,0 +1,79 @@
> >>> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
> >>> +%YAML 1.2
> >>> +---
> >>> +$id:
> http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
> >>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>> +
> >>> +title: Allwinner H6 DMIC Device Tree Bindings
> >>
> >> s/Device Tree Bindings//
> >>
> >
> > So, modify it to 'Allwinner H6 DMIC Devices Tree Bindings', sure?
>
> You pasted the same message, so what is the modification? I wrote you a
>  search&replace pattern.
>

"s/Device Tree Bindings//"
I don't understand what you mean.

>
>
>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Sept. 11, 2022, 1:28 p.m. UTC | #7
On 11/09/2022 08:18, 班涛 wrote:
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2022年9月8日周四 17:22写道:
> 
>> On 07/09/2022 15:03, 班涛 wrote:
>>>>> +++
>>>> b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
>>>>> @@ -0,0 +1,79 @@
>>>>> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
>>>>> +%YAML 1.2
>>>>> +---
>>>>> +$id:
>> http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>> +
>>>>> +title: Allwinner H6 DMIC Device Tree Bindings
>>>>
>>>> s/Device Tree Bindings//
>>>>
>>>
>>> So, modify it to 'Allwinner H6 DMIC Devices Tree Bindings', sure?
>>
>> You pasted the same message, so what is the modification? I wrote you a
>>  search&replace pattern.
>>
> 
> "s/Device Tree Bindings//"
> I don't understand what you mean.

It's a search&replace command from Unix tools...

https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/

https://vim.fandom.com/wiki/Search_and_replace#Basic_search_and_replace

Just remove that string.


Best regards,
Krzysztof
班涛 Sept. 13, 2022, 2:21 p.m. UTC | #8
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2022年9月11日周日 21:28写道:

> On 11/09/2022 08:18, 班涛 wrote:
> > Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 于2022年9月8日周四
> 17:22写道:
> >
> >> On 07/09/2022 15:03, 班涛 wrote:
> >>>>> +++
> >>>>
> b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
> >>>>> @@ -0,0 +1,79 @@
> >>>>> +# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
> >>>>> +%YAML 1.2
> >>>>> +---
> >>>>> +$id:
> >> http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
> >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>>>> +
> >>>>> +title: Allwinner H6 DMIC Device Tree Bindings
> >>>>
> >>>> s/Device Tree Bindings//
> >>>>
> >>>
> >>> So, modify it to 'Allwinner H6 DMIC Devices Tree Bindings', sure?
> >>
> >> You pasted the same message, so what is the modification? I wrote you a
> >>  search&replace pattern.
> >>
> >
> > "s/Device Tree Bindings//"
> > I don't understand what you mean.
>
> It's a search&replace command from Unix tools...
>
>
> https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/
>
> https://vim.fandom.com/wiki/Search_and_replace#Basic_search_and_replace
>
> Just remove that string.
>

Ok, I have released the V10 version, please review.

>
>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
new file mode 100644
index 0000000..0cfc07f
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/allwinner,sun50i-h6-dmic.yaml
@@ -0,0 +1,79 @@ 
+# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/allwinner,sun50i-h6-dmic.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Allwinner H6 DMIC Device Tree Bindings
+
+maintainers:
+  - Ban Tao <fengzheng923@gmail.com>
+
+properties:
+  "#sound-dai-cells":
+    const: 0
+
+  compatible:
+    const: allwinner,sun50i-h6-dmic
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Bus Clock
+      - description: Module Clock
+
+  clock-names:
+    items:
+      - const: bus
+      - const: mod
+
+  dmas:
+    items:
+      - description: RX DMA Channel
+
+  dma-names:
+    items:
+      - const: rx
+
+  resets:
+    maxItems: 1
+
+required:
+  - "#sound-dai-cells"
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+  - dmas
+  - dma-names
+  - resets
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    #include <dt-bindings/clock/sun50i-h6-ccu.h>
+    #include <dt-bindings/reset/sun50i-h6-ccu.h>
+
+    dmic: dmic@5095000 {
+      #sound-dai-cells = <0>;
+      compatible = "allwinner,sun50i-h6-dmic";
+      reg = <0x05095000 0x400>;
+      interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
+      clocks = <&ccu CLK_BUS_DMIC>, <&ccu CLK_DMIC>;
+      clock-names = "bus", "mod";
+      dmas = <&dma 7>;
+      dma-names = "rx";
+      resets = <&ccu RST_BUS_DMIC>;
+    };
+
+...