linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema
@ 2024-02-14  6:40 Balakrishnan Sambath
  2024-02-14  9:22 ` Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Balakrishnan Sambath @ 2024-02-14  6:40 UTC (permalink / raw)
  To: Claudiu Beznea, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Nicolas Ferre,
	Alexandre Belloni
  Cc: alsa-devel, linux-sound, devicetree, linux-arm-kernel,
	linux-kernel, Balakrishnan Sambath

Convert atmel-at91sam9g20ek-wm8731-audio DT binding to yaml
based json-schema.Change file name to match json-scheme naming.

Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
---
 .../bindings/sound/atmel,at91sam9g20ek-wm8731.yaml | 60 ++++++++++++++++++++++
 .../sound/atmel-at91sam9g20ek-wm8731-audio.txt     | 26 ----------
 2 files changed, 60 insertions(+), 26 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml b/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml
new file mode 100644
index 000000000000..f6330707fe1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/atmel,at91sam9g20ek-wm8731.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Atmel at91sam9g20ek wm8731 audio complex
+
+maintainers:
+  - Balakrishnan Sambath <balakrishnan.s@microchip.com>
+
+properties:
+  compatible:
+    const: atmel,at91sam9g20ek-wm8731-audio
+
+  atmel,model:
+    $ref: /schemas/types.yaml#/definitions/string
+    description: The user-visible name of this sound complex.
+  atmel,audio-routing:
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+    description: A list of the connections between audio components.
+    minItems: 2
+    items:
+      enum:
+        # Board Connectors
+        - "Ext Spk"
+        - "Int MIC"
+
+        # CODEC Pins
+        - LHPOUT
+        - MICIN
+  atmel,ssc-controller:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: The phandle of the SSC controller
+  atmel,audio-codec:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: The phandle of WM8731 audio codec
+
+required:
+  - compatible
+  - atmel,model
+  - atmel,audio-routing
+  - atmel,ssc-controller
+  - atmel,audio-codec
+
+additionalProperties: false
+
+examples:
+  - |
+    sound {
+        compatible = "atmel,at91sam9g20ek-wm8731-audio";
+        pinctrl-names = "default";
+        pinctrl-0 = <&pinctrl_pck0_as_mck>;
+        atmel,model = "wm8731 @ AT91SAMG20EK";
+        atmel,audio-routing =
+            "Ext Spk", "LHPOUT",
+            "Int MIC", "MICIN";
+        atmel,ssc-controller = <&ssc0>;
+        atmel,audio-codec = <&wm8731>;
+    };
diff --git a/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt b/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt
deleted file mode 100644
index 9c5a9947b64d..000000000000
--- a/Documentation/devicetree/bindings/sound/atmel-at91sam9g20ek-wm8731-audio.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-* Atmel at91sam9g20ek wm8731 audio complex
-
-Required properties:
-  - compatible: "atmel,at91sam9g20ek-wm8731-audio"
-  - atmel,model: The user-visible name of this sound complex.
-  - atmel,audio-routing: A list of the connections between audio components.
-  - atmel,ssc-controller: The phandle of the SSC controller
-  - atmel,audio-codec: The phandle of the WM8731 audio codec
-Optional properties:
-  - pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt
-
-Example:
-sound {
-	compatible = "atmel,at91sam9g20ek-wm8731-audio";
-	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_pck0_as_mck>;
-
-	atmel,model = "wm8731 @ AT91SAMG20EK";
-
-	atmel,audio-routing =
-		"Ext Spk", "LHPOUT",
-		"Int MIC", "MICIN";
-
-	atmel,ssc-controller = <&ssc0>;
-	atmel,audio-codec = <&wm8731>;
-};

---
base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
change-id: 20240214-at91sam9g20ek-wm8731-yaml-404ddddbb91a

Best regards,
-- 
Balakrishnan Sambath <balakrishnan.s@microchip.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema
  2024-02-14  6:40 [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema Balakrishnan Sambath
@ 2024-02-14  9:22 ` Rob Herring
  2024-02-14 12:24 ` Mark Brown
  2024-02-14 13:58 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2024-02-14  9:22 UTC (permalink / raw)
  To: Balakrishnan Sambath
  Cc: devicetree, Conor Dooley, alsa-devel, Liam Girdwood, linux-kernel,
	Mark Brown, Alexandre Belloni, linux-sound, Rob Herring,
	Krzysztof Kozlowski, Claudiu Beznea, linux-arm-kernel


On Wed, 14 Feb 2024 12:10:06 +0530, Balakrishnan Sambath wrote:
> Convert atmel-at91sam9g20ek-wm8731-audio DT binding to yaml
> based json-schema.Change file name to match json-scheme naming.
> 
> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
> ---
>  .../bindings/sound/atmel,at91sam9g20ek-wm8731.yaml | 60 ++++++++++++++++++++++
>  .../sound/atmel-at91sam9g20ek-wm8731-audio.txt     | 26 ----------
>  2 files changed, 60 insertions(+), 26 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml:26:11: [error] string value is redundantly quoted with any quotes (quoted-strings)
./Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml:27:11: [error] string value is redundantly quoted with any quotes (quoted-strings)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240214-at91sam9g20ek-wm8731-yaml-v1-1-33333e17383b@microchip.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema
  2024-02-14  6:40 [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema Balakrishnan Sambath
  2024-02-14  9:22 ` Rob Herring
@ 2024-02-14 12:24 ` Mark Brown
  2024-02-14 13:58 ` Rob Herring
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-02-14 12:24 UTC (permalink / raw)
  To: Balakrishnan Sambath
  Cc: devicetree, Conor Dooley, Alexandre Belloni, Liam Girdwood,
	linux-kernel, linux-sound, Claudiu Beznea, Rob Herring,
	Krzysztof Kozlowski, alsa-devel, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]

On Wed, Feb 14, 2024 at 12:10:06PM +0530, Balakrishnan Sambath wrote:
> Convert atmel-at91sam9g20ek-wm8731-audio DT binding to yaml
> based json-schema.Change file name to match json-scheme naming.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema
  2024-02-14  6:40 [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema Balakrishnan Sambath
  2024-02-14  9:22 ` Rob Herring
  2024-02-14 12:24 ` Mark Brown
@ 2024-02-14 13:58 ` Rob Herring
  2024-02-23  9:27   ` Balakrishnan.S
  2 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2024-02-14 13:58 UTC (permalink / raw)
  To: Balakrishnan Sambath
  Cc: devicetree, Conor Dooley, Alexandre Belloni, Liam Girdwood,
	linux-kernel, linux-sound, Claudiu Beznea, Mark Brown,
	Krzysztof Kozlowski, alsa-devel, linux-arm-kernel

On Wed, Feb 14, 2024 at 12:10:06PM +0530, Balakrishnan Sambath wrote:
> Convert atmel-at91sam9g20ek-wm8731-audio DT binding to yaml
> based json-schema.Change file name to match json-scheme naming.
> 
> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
> ---
>  .../bindings/sound/atmel,at91sam9g20ek-wm8731.yaml | 60 ++++++++++++++++++++++
>  .../sound/atmel-at91sam9g20ek-wm8731-audio.txt     | 26 ----------
>  2 files changed, 60 insertions(+), 26 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml b/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml
> new file mode 100644
> index 000000000000..f6330707fe1b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/atmel,at91sam9g20ek-wm8731.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Atmel at91sam9g20ek wm8731 audio complex
> +
> +maintainers:
> +  - Balakrishnan Sambath <balakrishnan.s@microchip.com>
> +
> +properties:
> +  compatible:
> +    const: atmel,at91sam9g20ek-wm8731-audio
> +
> +  atmel,model:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: The user-visible name of this sound complex.

blank line between DT properties

> +  atmel,audio-routing:
> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +    description: A list of the connections between audio components.
> +    minItems: 2

No max?

> +    items:
> +      enum:
> +        # Board Connectors
> +        - "Ext Spk"
> +        - "Int MIC"
> +
> +        # CODEC Pins
> +        - LHPOUT
> +        - MICIN
> +  atmel,ssc-controller:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: The phandle of the SSC controller
> +  atmel,audio-codec:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: The phandle of WM8731 audio codec
> +
> +required:
> +  - compatible
> +  - atmel,model
> +  - atmel,audio-routing
> +  - atmel,ssc-controller
> +  - atmel,audio-codec
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    sound {
> +        compatible = "atmel,at91sam9g20ek-wm8731-audio";
> +        pinctrl-names = "default";
> +        pinctrl-0 = <&pinctrl_pck0_as_mck>;
> +        atmel,model = "wm8731 @ AT91SAMG20EK";
> +        atmel,audio-routing =
> +            "Ext Spk", "LHPOUT",
> +            "Int MIC", "MICIN";
> +        atmel,ssc-controller = <&ssc0>;
> +        atmel,audio-codec = <&wm8731>;
> +    };

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema
  2024-02-14 13:58 ` Rob Herring
@ 2024-02-23  9:27   ` Balakrishnan.S
  0 siblings, 0 replies; 5+ messages in thread
From: Balakrishnan.S @ 2024-02-23  9:27 UTC (permalink / raw)
  To: robh
  Cc: devicetree, conor+dt, alexandre.belloni, lgirdwood, linux-kernel,
	linux-sound, claudiu.beznea, broonie, krzysztof.kozlowski+dt,
	alsa-devel, linux-arm-kernel

Hi Rob,

On 14/02/24 7:28 pm, Rob Herring wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> On Wed, Feb 14, 2024 at 12:10:06PM +0530, Balakrishnan Sambath wrote:
>> Convert atmel-at91sam9g20ek-wm8731-audio DT binding to yaml
>> based json-schema.Change file name to match json-scheme naming.
>>
>> Signed-off-by: Balakrishnan Sambath <balakrishnan.s@microchip.com>
>> ---
>>   .../bindings/sound/atmel,at91sam9g20ek-wm8731.yaml | 60 ++++++++++++++++++++++
>>   .../sound/atmel-at91sam9g20ek-wm8731-audio.txt     | 26 ----------
>>   2 files changed, 60 insertions(+), 26 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml b/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml
>> new file mode 100644
>> index 000000000000..f6330707fe1b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/atmel,at91sam9g20ek-wm8731.yaml
>> @@ -0,0 +1,60 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/sound/atmel,at91sam9g20ek-wm8731.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Atmel at91sam9g20ek wm8731 audio complex
>> +
>> +maintainers:
>> +  - Balakrishnan Sambath <balakrishnan.s@microchip.com>
>> +
>> +properties:
>> +  compatible:
>> +    const: atmel,at91sam9g20ek-wm8731-audio
>> +
>> +  atmel,model:
>> +    $ref: /schemas/types.yaml#/definitions/string
>> +    description: The user-visible name of this sound complex.
> 
> blank line between DT properties
> 
sure, thanks for pointing it out. I'll fix this in v2
>> +  atmel,audio-routing:
>> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
>> +    description: A list of the connections between audio components.
>> +    minItems: 2
> 
> No max?
> 

Here, there's no explicit constraint on the maximum number of items, so 
I only enforced minItems. Please let me know if I'm doing something wrong.

>> +    items:
>> +      enum:
>> +        # Board Connectors
>> +        - "Ext Spk"
>> +        - "Int MIC"
>> +
>> +        # CODEC Pins
>> +        - LHPOUT
>> +        - MICIN
>> +  atmel,ssc-controller:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description: The phandle of the SSC controller
>> +  atmel,audio-codec:
>> +    $ref: /schemas/types.yaml#/definitions/phandle
>> +    description: The phandle of WM8731 audio codec
>> +
>> +required:
>> +  - compatible
>> +  - atmel,model
>> +  - atmel,audio-routing
>> +  - atmel,ssc-controller
>> +  - atmel,audio-codec
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    sound {
>> +        compatible = "atmel,at91sam9g20ek-wm8731-audio";
>> +        pinctrl-names = "default";
>> +        pinctrl-0 = <&pinctrl_pck0_as_mck>;
>> +        atmel,model = "wm8731 @ AT91SAMG20EK";
>> +        atmel,audio-routing =
>> +            "Ext Spk", "LHPOUT",
>> +            "Int MIC", "MICIN";
>> +        atmel,ssc-controller = <&ssc0>;
>> +        atmel,audio-codec = <&wm8731>;
>> +    };

-- 
Best regards,
Balakrishnan S

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-02-23  9:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-14  6:40 [PATCH] dt-bindings: sound:atmel-at91sam9g20ek: convert bindings to json-schema Balakrishnan Sambath
2024-02-14  9:22 ` Rob Herring
2024-02-14 12:24 ` Mark Brown
2024-02-14 13:58 ` Rob Herring
2024-02-23  9:27   ` Balakrishnan.S

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).