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
State Accepted
Commit 5cf934e84659ca2f03db6254978d56f053745366
Headers show
Series None | expand

Commit Message

Ban Tao 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

Ban Tao Sept. 7, 2022, 1:03 p.m. UTC | #1
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
>
Ban Tao Sept. 11, 2022, 6:18 a.m. UTC | #2
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 | #3
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
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>;
+    };
+
+...