diff mbox series

dt-bindings: sound: wm8750: convert to the json-schema

Message ID 20210512205926.780-1-zajec5@gmail.com
State New
Headers show
Series dt-bindings: sound: wm8750: convert to the json-schema | expand

Commit Message

Rafał Miłecki May 12, 2021, 8:59 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

This helps validating DTS files.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../devicetree/bindings/sound/wm8750.txt      | 18 --------
 .../devicetree/bindings/sound/wm8750.yaml     | 42 +++++++++++++++++++
 2 files changed, 42 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/wm8750.txt
 create mode 100644 Documentation/devicetree/bindings/sound/wm8750.yaml

Comments

Rob Herring May 18, 2021, 1:07 a.m. UTC | #1
On Wed, 12 May 2021 22:59:26 +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This helps validating DTS files.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  .../devicetree/bindings/sound/wm8750.txt      | 18 --------
>  .../devicetree/bindings/sound/wm8750.yaml     | 42 +++++++++++++++++++
>  2 files changed, 42 insertions(+), 18 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/sound/wm8750.txt
>  create mode 100644 Documentation/devicetree/bindings/sound/wm8750.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Mark Brown May 18, 2021, 6:55 p.m. UTC | #2
On Wed, May 12, 2021 at 10:59:26PM +0200, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This helps validating DTS files.

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.
Rafał Miłecki May 18, 2021, 9:45 p.m. UTC | #3
On 18.05.2021 20:55, Mark Brown wrote:
> On Wed, May 12, 2021 at 10:59:26PM +0200, Rafał Miłecki wrote:
>> From: Rafał Miłecki <rafal@milecki.pl>
>>
>> This helps validating DTS files.
> 
> 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.

Oops, "ASoC: " prefix is quite unique, no many subsystems use any prefix
before the "dt-bindings:". I didn't think of checking that, sorry.
Mark Brown May 19, 2021, 11:50 a.m. UTC | #4
On Tue, May 18, 2021 at 11:45:17PM +0200, Rafał Miłecki wrote:

> Oops, "ASoC: " prefix is quite unique, no many subsystems use any prefix
> before the "dt-bindings:". I didn't think of checking that, sorry.

It's also the sound: bit - it's not just that you got things a
surprising way round.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/wm8750.txt b/Documentation/devicetree/bindings/sound/wm8750.txt
deleted file mode 100644
index 682f221f6f38..000000000000
--- a/Documentation/devicetree/bindings/sound/wm8750.txt
+++ /dev/null
@@ -1,18 +0,0 @@ 
-WM8750 and WM8987 audio CODECs
-
-These devices support both I2C and SPI (configured with pin strapping
-on the board).
-
-Required properties:
-
-  - compatible : "wlf,wm8750" or "wlf,wm8987"
-
-  - reg : the I2C address of the device for I2C, the chip select
-          number for SPI.
-
-Example:
-
-wm8750: codec@1a {
-	compatible = "wlf,wm8750";
-	reg = <0x1a>;
-};
diff --git a/Documentation/devicetree/bindings/sound/wm8750.yaml b/Documentation/devicetree/bindings/sound/wm8750.yaml
new file mode 100644
index 000000000000..24246ac7bbdf
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8750.yaml
@@ -0,0 +1,42 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/wm8750.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: WM8750 and WM8987 audio CODECs
+
+description: |
+  These devices support both I2C and SPI (configured with pin strapping
+  on the board).
+
+maintainers:
+  - Mark Brown <broonie@kernel.org>
+
+properties:
+  compatible:
+    enum:
+      - wlf,wm8750
+      - wlf,wm8987
+
+  reg:
+    description:
+      The I2C address of the device for I2C, the chip select number for SPI
+    maxItems: 1
+
+additionalProperties: false
+
+required:
+  - reg
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        codec@1a {
+            compatible = "wlf,wm8750";
+            reg = <0x1a>;
+        };
+    };