2022-08-30 15:23:34

by Ban Tao

[permalink] [raw]
Subject: [PATCH v9 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

DT binding documentation for this new ASoC driver.

Signed-off-by: Ban Tao <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
---
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

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 <[email protected]>
+
+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>;
+ };
+
+...
--
2.7.4


2022-08-30 18:03:53

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v9 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

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 <[email protected]>
> +
> +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

2022-08-30 18:22:21

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v9 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

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

2022-08-30 18:32:56

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v9 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

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?


Attachments:
(No filename) (415.00 B)
signature.asc (495.00 B)
Download all attachments

2022-09-08 09:26:44

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v9 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

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

2022-09-11 13:31:10

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v9 2/2] ASoC: sun50i-dmic: dt-bindings: add DT bindings for DMIC controller

On 11/09/2022 08:18, 班涛 wrote:
> Krzysztof Kozlowski <[email protected]> 于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