diff mbox series

[v2] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml

Message ID 20191106111233.6905-1-marcus.folkesson@gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml | expand

Commit Message

Marcus Folkesson Nov. 6, 2019, 11:12 a.m. UTC
Rewrite bindings to use json-schema vocabulary.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---

Notes:
    v2:
    	- Remove description for reg and spi-max-frequency (Rob & Alexa)
    	- Drop maxItems for vref-supply

 .../bindings/iio/dac/lltc,ltc1660.yaml        | 49 +++++++++++++++++++
 .../devicetree/bindings/iio/dac/ltc1660.txt   | 21 --------
 MAINTAINERS                                   |  2 +-
 3 files changed, 50 insertions(+), 22 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/dac/ltc1660.txt

Comments

Rob Herring (Arm) Nov. 7, 2019, 1:06 a.m. UTC | #1
On Wed, Nov 06, 2019 at 12:12:33PM +0100, Marcus Folkesson wrote:
> Rewrite bindings to use json-schema vocabulary.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
> 
> Notes:
>     v2:
>     	- Remove description for reg and spi-max-frequency (Rob & Alexa)
>     	- Drop maxItems for vref-supply
> 
>  .../bindings/iio/dac/lltc,ltc1660.yaml        | 49 +++++++++++++++++++
>  .../devicetree/bindings/iio/dac/ltc1660.txt   | 21 --------
>  MAINTAINERS                                   |  2 +-
>  3 files changed, 50 insertions(+), 22 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
>  delete mode 100644 Documentation/devicetree/bindings/iio/dac/ltc1660.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
> new file mode 100644
> index 000000000000..505b3d54b81c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: GPL-2.0
> +# Copyright 2019 Marcus Folkesson <marcus.folkesson@gmail.com>

If you own copyright to the old binding which I assume you do if you 
added it here, can you add 'BSD-2-Clause' to the license. Same for the 
other conversion.

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
new file mode 100644
index 000000000000..505b3d54b81c
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
@@ -0,0 +1,49 @@ 
+# SPDX-License-Identifier: GPL-2.0
+# Copyright 2019 Marcus Folkesson <marcus.folkesson@gmail.com>
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/bindings/iio/dac/lltc,ltc1660.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Linear Technology Micropower octal 8-Bit and 10-Bit DACs
+
+maintainers:
+  - Marcus Folkesson <marcus.folkesson@gmail.com>
+
+description: |
+  Bindings for the Linear Technology Micropower octal 8-Bit and 10-Bit DAC.
+  Datasheet can be found here: https://www.analog.com/media/en/technical-documentation/data-sheets/166560fa.pdf
+
+properties:
+  compatible:
+    enum:
+      - lltc,ltc1660
+      - lltc,ltc1665
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency:
+    maximum: 5000000
+
+  vref-supply:
+    description: Phandle to the external reference voltage supply.
+
+required:
+  - compatible
+  - reg
+  - vref-supply
+
+examples:
+  - |
+    spi {
+      #address-cells = <1>;
+      #size-cells = <0>;
+  
+      dac@0 {
+        compatible = "lltc,ltc1660";
+        reg = <0>;
+        spi-max-frequency = <5000000>;
+        vref-supply = <&vref_reg>;
+      };
+    };
diff --git a/Documentation/devicetree/bindings/iio/dac/ltc1660.txt b/Documentation/devicetree/bindings/iio/dac/ltc1660.txt
deleted file mode 100644
index c5b5f22d6c64..000000000000
--- a/Documentation/devicetree/bindings/iio/dac/ltc1660.txt
+++ /dev/null
@@ -1,21 +0,0 @@ 
-* Linear Technology Micropower octal 8-Bit and 10-Bit DACs
-
-Required properties:
- - compatible: Must be one of the following:
-		"lltc,ltc1660"
-		"lltc,ltc1665"
- - reg: SPI chip select number for the device
- - vref-supply: Phandle to the voltage reference supply
-
-Recommended properties:
- - spi-max-frequency: Definition as per
-	 Documentation/devicetree/bindings/spi/spi-bus.txt.
-	 Max frequency for this chip is 5 MHz.
-
-Example:
-dac@0 {
-	compatible = "lltc,ltc1660";
-	reg = <0>;
-	spi-max-frequency = <5000000>;
-	vref-supply = <&vref_reg>;
-};
diff --git a/MAINTAINERS b/MAINTAINERS
index fbccc9d450ff..23497d713298 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9619,7 +9619,7 @@  LTC1660 DAC DRIVER
 M:	Marcus Folkesson <marcus.folkesson@gmail.com>
 L:	linux-iio@vger.kernel.org
 S:	Maintained
-F:	Documentation/devicetree/bindings/iio/dac/ltc1660.txt
+F:	Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
 F:	drivers/iio/dac/ltc1660.c
 
 LTC4261 HARDWARE MONITOR DRIVER