dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml
Subsystems (3)
Marcus Folkesson
maintainerPATCH 1/1 dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml
Rewrite bindings to use json-schema vocabulary.
--- .../bindings/iio/dac/lltc,ltc1660.yaml | 54 +++++++++++++++++++ .../devicetree/bindings/iio/dac/ltc1660.txt | 21 -------- MAINTAINERS | 2 +- 3 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml delete mode 100644 Documentation/devicetree/bindings/iio/dac/ltc1660.txt
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +54 -0
@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright 2019 Marcus Folkesson <[email protected]> +%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 <[email protected]> + +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: + description: SPI chip select number for the device + maxItems: 1 + + spi-max-frequency: + description: | + Definition as per Documentation/devicetree/bindings/spi/spi-bus.txt. + maximum: 5000000 + maxItems: 1 + + vref-supply: + description: Phandle to the external reference voltage supply. + maxItems: 1 + +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>; + }; + };
Documentation/devicetree/bindings/iio/dac/ltc1660.txt deleted +0 -21
@@ -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>; -};
MAINTAINERS +1 -1
@@ -9619,7 +9619,7 @@ LTC1660 DAC DRIVER M: Marcus Folkesson <[email protected]> L: [email protected] 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
Signature · 1 line
2.23.0
Quoted 3 lines · Marcus Folkesson
[External]
Rewrite bindings to use json-schema vocabulary.
Hey,
Overall looks good.
A few comments inline.
Rob may add more.
Quoted 35 lines
Signed-off-by Marcus Folkesson <[email protected]>--- .../bindings/iio/dac/lltc,ltc1660.yaml | 54 +++++++++++++++++++ .../devicetree/bindings/iio/dac/ltc1660.txt | 21 -------- MAINTAINERS | 2 +- 3 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml delete mode 100644 Documentation/devicetree/bindings/iio/dac/ltc1660.txtDocumentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +14
-0@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright 2019 Marcus Folkesson <[email protected]> +%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 <[email protected]> + +description: | + Bindings for the Linear Technology Micropower octal 8-Bit and 10-BitDAC.
+ Datasheet can be found here:
https://www.analog.com/media/en/technical-documentation/data-sheets/166560fa.pdf
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml line 24
Quoted 9 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +9
-0+ +properties: + compatible: + enum: + - lltc,ltc1660 + - lltc,ltc1665 + + reg: + description: SPI chip select number for the device
You can remove description.
It's a standard property.
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
Quoted 8 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +5
-0+ maxItems: 1 + + spi-max-frequency: + description: | + Definition as per Documentation/devicetree/bindings/spi/spi-bus.txt.
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +2
-0+ maximum: 5000000 + maxItems: 1
I think you can probably remove spi-max-frequency from here. It's documented in the base SPI schema.
Quoted 64 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +23
-0+ + vref-supply: + description: Phandle to the external reference voltage supply. + maxItems: 1 + +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>; + }; + };Documentation/devicetree/bindings/iio/dac/ltc1660.txt deleted +0
-21@@ -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>; -};MAINTAINERS +1
-1@@ -9619,7 +9619,7 @@ LTC1660 DAC DRIVER M: Marcus Folkesson <[email protected]> L: [email protected] 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
Marcus Folkesson
maintainerHi Alexandru,
See comments below.
Quoted 11 lines · Alexandru
Quoted 3 lines · Marcus Folkesson
[External]
Rewrite bindings to use json-schema vocabulary.
Hey,
Overall looks good.
A few comments inline.
Rob may add more.
Thank you for looking into this!
Quoted 40 lines
Quoted 40 lines
Signed-off-by Marcus Folkesson <[email protected]>--- .../bindings/iio/dac/lltc,ltc1660.yaml | 54 +++++++++++++++++++ .../devicetree/bindings/iio/dac/ltc1660.txt | 21 -------- MAINTAINERS | 2 +- 3 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml delete mode 100644 Documentation/devicetree/bindings/iio/dac/ltc1660.txtDocumentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +14
-0@@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright 2019 Marcus Folkesson <[email protected]> +%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 <[email protected]> + +description: | + Bindings for the Linear Technology Micropower octal 8-Bit and 10-BitDAC.
+ Datasheet can be found here:
https://www.analog.com/media/en/technical-documentation/data-sheets/166560fa.pdfDocumentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +4
-0+ +properties: + compatible: + enum:
Quoted 9 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml line 24
Quoted 5 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +5
-0+ - lltc,ltc1660 + - lltc,ltc1665 + + reg: + description: SPI chip select number for the deviceYou can remove description.
It's a standard property.
Ok, I will remove it.
Quoted 9 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
Quoted 8 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +5
-0+ maxItems: 1 + + spi-max-frequency: + description: | + Definition as per Documentation/devicetree/bindings/spi/spi-bus.txt.
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +2
-0+ maximum: 5000000 + maxItems: 1
Quoted 3 lines
I think you can probably remove
spi-max-frequencyfrom here. It's documented in the base SPI schema.
Yes it is, and I was not really sure if I should include that property, but
I wanted to somehow document the maximum frequency that the chip can handle as it could be useful information.
Quoted 63 lines
Quoted 63 lines
Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml new file +23
-0+ + vref-supply: + description: Phandle to the external reference voltage supply. + maxItems: 1 + +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>; + }; + };Documentation/devicetree/bindings/iio/dac/ltc1660.txt deleted +0
-21@@ -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>; -};MAINTAINERS +1
-1@@ -9619,7 +9619,7 @@ LTC1660 DAC DRIVER M: Marcus Folkesson <[email protected]> L: [email protected] 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
Quoted 1 line
MAINTAINERS LTC1660 DAC DRIVER · line 9625
Quoted 1 line
MAINTAINERS +0
-0LTC4261 HARDWARE MONITOR DRIVER
I guess I wait for Robs review until I post a v2.
Thanks,
Marcus Folkesson