All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Rob Herring <robh+dt@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org
Subject: [PATCH v3] ASoC: dt-bindings: ak4613: switch to yaml base Documentation
Date: 16 Jul 2020 09:31:01 +0900	[thread overview]
Message-ID: <87y2nk2tfd.wl-kuninori.morimoto.gx@renesas.com> (raw)

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch switches from .txt base to .yaml base Document.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87mu4cxlo2.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87o8pf3923.wl-kuninori.morimoto.gx@renesas.com
---
v2 -> v3
	- add Reviewd-by
	- add Link
	- use generic node name on examples
	
 .../devicetree/bindings/sound/ak4613.txt      | 27 --------
 .../devicetree/bindings/sound/ak4613.yaml     | 65 +++++++++++++++++++
 2 files changed, 65 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ak4613.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ak4613.yaml

diff --git a/Documentation/devicetree/bindings/sound/ak4613.txt b/Documentation/devicetree/bindings/sound/ak4613.txt
deleted file mode 100644
index 49a2e74fd9cb..000000000000
--- a/Documentation/devicetree/bindings/sound/ak4613.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-AK4613 I2C transmitter
-
-This device supports I2C mode only.
-
-Required properties:
-
-- compatible : "asahi-kasei,ak4613"
-- reg : The chip select number on the I2C bus
-
-Optional properties:
-- asahi-kasei,in1-single-end	: Boolean. Indicate input / output pins are single-ended.
-- asahi-kasei,in2-single-end	  rather than differential.
-- asahi-kasei,out1-single-end
-- asahi-kasei,out2-single-end
-- asahi-kasei,out3-single-end
-- asahi-kasei,out4-single-end
-- asahi-kasei,out5-single-end
-- asahi-kasei,out6-single-end
-
-Example:
-
-&i2c {
-	ak4613: ak4613@10 {
-		compatible = "asahi-kasei,ak4613";
-		reg = <0x10>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/ak4613.yaml b/Documentation/devicetree/bindings/sound/ak4613.yaml
new file mode 100644
index 000000000000..5aae6126c540
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ak4613.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ak4613.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AK4613 I2C transmitter Device Tree Bindings
+
+maintainers:
+  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+properties:
+  compatible:
+    const: asahi-kasei,ak4613
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+  # for OF-graph
+  port:
+    $ref: "audio-graph-card.yaml#definitions/port"
+  ports:
+    $ref: "audio-graph-card.yaml#definitions/ports"
+
+# use patternProperties to avoid naming "xxx,yyy" issue
+patternProperties:
+  "^asahi-kasei,in1-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,in2-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out1-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out2-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out3-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out4-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out5-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out6-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        ak4613: codec@10 {
+            compatible = "asahi-kasei,ak4613";
+            reg = <0x10>;
+        };
+    };
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Rob Herring <robh+dt@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org
Subject: [PATCH v3] ASoC: dt-bindings: ak4613: switch to yaml base Documentation
Date: 16 Jul 2020 09:31:01 +0900	[thread overview]
Message-ID: <87y2nk2tfd.wl-kuninori.morimoto.gx@renesas.com> (raw)

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch switches from .txt base to .yaml base Document.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87mu4cxlo2.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/87o8pf3923.wl-kuninori.morimoto.gx@renesas.com
---
v2 -> v3
	- add Reviewd-by
	- add Link
	- use generic node name on examples
	
 .../devicetree/bindings/sound/ak4613.txt      | 27 --------
 .../devicetree/bindings/sound/ak4613.yaml     | 65 +++++++++++++++++++
 2 files changed, 65 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/ak4613.txt
 create mode 100644 Documentation/devicetree/bindings/sound/ak4613.yaml

diff --git a/Documentation/devicetree/bindings/sound/ak4613.txt b/Documentation/devicetree/bindings/sound/ak4613.txt
deleted file mode 100644
index 49a2e74fd9cb..000000000000
--- a/Documentation/devicetree/bindings/sound/ak4613.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-AK4613 I2C transmitter
-
-This device supports I2C mode only.
-
-Required properties:
-
-- compatible : "asahi-kasei,ak4613"
-- reg : The chip select number on the I2C bus
-
-Optional properties:
-- asahi-kasei,in1-single-end	: Boolean. Indicate input / output pins are single-ended.
-- asahi-kasei,in2-single-end	  rather than differential.
-- asahi-kasei,out1-single-end
-- asahi-kasei,out2-single-end
-- asahi-kasei,out3-single-end
-- asahi-kasei,out4-single-end
-- asahi-kasei,out5-single-end
-- asahi-kasei,out6-single-end
-
-Example:
-
-&i2c {
-	ak4613: ak4613@10 {
-		compatible = "asahi-kasei,ak4613";
-		reg = <0x10>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/ak4613.yaml b/Documentation/devicetree/bindings/sound/ak4613.yaml
new file mode 100644
index 000000000000..5aae6126c540
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ak4613.yaml
@@ -0,0 +1,65 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/ak4613.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: AK4613 I2C transmitter Device Tree Bindings
+
+maintainers:
+  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+properties:
+  compatible:
+    const: asahi-kasei,ak4613
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  "#sound-dai-cells":
+    const: 0
+
+  # for OF-graph
+  port:
+    $ref: "audio-graph-card.yaml#definitions/port"
+  ports:
+    $ref: "audio-graph-card.yaml#definitions/ports"
+
+# use patternProperties to avoid naming "xxx,yyy" issue
+patternProperties:
+  "^asahi-kasei,in1-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,in2-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out1-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out2-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out3-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out4-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out5-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+  "^asahi-kasei,out6-single-end$":
+    $ref: /schemas/types.yaml#/definitions/flag
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        ak4613: codec@10 {
+            compatible = "asahi-kasei,ak4613";
+            reg = <0x10>;
+        };
+    };
-- 
2.25.1


             reply	other threads:[~2020-07-16  0:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16  0:31 Kuninori Morimoto [this message]
2020-07-16  0:31 ` [PATCH v3] ASoC: dt-bindings: ak4613: switch to yaml base Documentation Kuninori Morimoto
2020-07-16 23:56 ` Mark Brown
2020-07-16 23:56   ` Mark Brown
2020-07-27 14:39 ` Rob Herring
2020-07-27 14:39   ` Rob Herring
2020-07-28 16:54   ` Mark Brown
2020-07-28 16:54     ` Mark Brown
2020-07-30  0:57     ` Kuninori Morimoto
2020-07-30  0:57       ` Kuninori Morimoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2nk2tfd.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.