devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema
@ 2023-05-16  5:44 David Lin
  2023-05-16 16:11 ` Krzysztof Kozlowski
  2023-05-17 14:50 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: David Lin @ 2023-05-16  5:44 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux,
	David Lin

Convert the NAU8810 audio CODEC bindings to DT schema.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
---
 .../devicetree/bindings/sound/nau8810.txt     | 17 -------
 .../bindings/sound/nuvoton,nau8810.yaml       | 45 +++++++++++++++++++
 2 files changed, 45 insertions(+), 17 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/nau8810.txt
 create mode 100644 Documentation/devicetree/bindings/sound/nuvoton,nau8810.yaml

diff --git a/Documentation/devicetree/bindings/sound/nau8810.txt b/Documentation/devicetree/bindings/sound/nau8810.txt
deleted file mode 100644
index 7deaa452b200..000000000000
--- a/Documentation/devicetree/bindings/sound/nau8810.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-NAU8810/NAU8812/NAU8814 audio CODEC
-
-This device supports I2C only.
-
-Required properties:
-
-  - compatible : One of "nuvoton,nau8810" or "nuvoton,nau8812" or
-	"nuvoton,nau8814"
-
-  - reg : the I2C address of the device.
-
-Example:
-
-codec: nau8810@1a {
-	compatible = "nuvoton,nau8810";
-	reg = <0x1a>;
-};
diff --git a/Documentation/devicetree/bindings/sound/nuvoton,nau8810.yaml b/Documentation/devicetree/bindings/sound/nuvoton,nau8810.yaml
new file mode 100644
index 000000000000..d9696f6c75ed
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nuvoton,nau8810.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/nuvoton,nau8810.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NAU8810/NAU8812/NAU8814 audio CODEC
+
+maintainers:
+  - David Lin <CTLIN0@nuvoton.com>
+
+allOf:
+  - $ref: dai-common.yaml#
+
+properties:
+  compatible:
+    enum:
+      - nuvoton,nau8810
+      - nuvoton,nau8812
+      - nuvoton,nau8814
+
+  reg:
+    maxItems: 1
+
+  '#sound-dai-cells':
+    const: 0
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        codec@1a {
+            #sound-dai-cells = <0>;
+            compatible = "nuvoton,nau8810";
+            reg = <0x1a>;
+        };
+    };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema
  2023-05-16  5:44 [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema David Lin
@ 2023-05-16 16:11 ` Krzysztof Kozlowski
  2023-05-17  6:29   ` AS50 CTLin0
  2023-05-17 14:50 ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-16 16:11 UTC (permalink / raw)
  To: David Lin, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 16/05/2023 07:44, David Lin wrote:
> Convert the NAU8810 audio CODEC bindings to DT schema.
> 
> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
> ---

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

> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        codec@1a {
> +            #sound-dai-cells = <0>;

Please put sound-dai-cells at the end. In DTS convention is to have
compatible first, reg second.

With this:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

> +            compatible = "nuvoton,nau8810";
> +            reg = <0x1a>;
> +        };
> +    };

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema
  2023-05-16 16:11 ` Krzysztof Kozlowski
@ 2023-05-17  6:29   ` AS50 CTLin0
  0 siblings, 0 replies; 4+ messages in thread
From: AS50 CTLin0 @ 2023-05-17  6:29 UTC (permalink / raw)
  To: Krzysztof Kozlowski, broonie
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On 5/17/2023 12:11 AM, Krzysztof Kozlowski wrote:
> On 16/05/2023 07:44, David Lin wrote:
>> Convert the NAU8810 audio CODEC bindings to DT schema.
>>
>> Signed-off-by: David Lin <CTLIN0@nuvoton.com>
>> ---
> Thank you for your patch. There is something to discuss/improve.
>
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    i2c {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +
>> +        codec@1a {
>> +            #sound-dai-cells = <0>;
> Please put sound-dai-cells at the end. In DTS convention is to have
> compatible first, reg second.
>
> With this:
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
>> +            compatible = "nuvoton,nau8810";
>> +            reg = <0x1a>;
>> +        };
>> +    };
> Best regards,
> Krzysztof


 From your description, my understanding is since I set required items
sequentially, one is compatible, the other is reg.

So the required properties should be filled in first, and the follow up
properties are these optional properties.

________________________________
________________________________
 The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema
  2023-05-16  5:44 [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema David Lin
  2023-05-16 16:11 ` Krzysztof Kozlowski
@ 2023-05-17 14:50 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2023-05-17 14:50 UTC (permalink / raw)
  To: David Lin
  Cc: lgirdwood, robh+dt, krzysztof.kozlowski+dt, alsa-devel,
	devicetree, YHCHuang, KCHSU0, WTLI, SJLIN0, ctlin0.linux

On Tue, 16 May 2023 13:44:48 +0800, David Lin wrote:
> Convert the NAU8810 audio CODEC bindings to DT schema.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: dt-bindings: nau8810: Convert to dtschema
      commit: bc8c537bd68c6fa99f81609d912115e0a6499fb5

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-17 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16  5:44 [PATCH] ASoC: dt-bindings: nau8810: Convert to dtschema David Lin
2023-05-16 16:11 ` Krzysztof Kozlowski
2023-05-17  6:29   ` AS50 CTLin0
2023-05-17 14:50 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).