* [PATCH] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml
@ 2019-11-04 17:40 Marcus Folkesson
2019-11-05 6:42 ` Ardelean, Alexandru
0 siblings, 1 reply; 3+ messages in thread
From: Marcus Folkesson @ 2019-11-04 17:40 UTC (permalink / raw)
To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Rob Herring, Mark Rutland,
Marcus Folkesson, Kent Gustavsson, Mauro Carvalho Chehab,
David S . Miller, Greg Kroah-Hartman, Paul E . McKenney
Cc: linux-iio, devicetree, linux-kernel
Rewrite bindings to use json-schema vocabulary.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
.../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
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..1f3136bfffcd
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
@@ -0,0 +1,54 @@
+# 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:
+ 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>;
+ };
+ };
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
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml
2019-11-04 17:40 [PATCH] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml Marcus Folkesson
@ 2019-11-05 6:42 ` Ardelean, Alexandru
2019-11-05 8:14 ` Marcus Folkesson
0 siblings, 1 reply; 3+ messages in thread
From: Ardelean, Alexandru @ 2019-11-05 6:42 UTC (permalink / raw)
To: marcus.folkesson, kent, davem, gregkh, mark.rutland, paulmck,
lars, jic23, knaack.h, pmeerw, robh+dt, mchehab+samsung
Cc: devicetree, linux-kernel, linux-iio
On Mon, 2019-11-04 at 18:40 +0100, Marcus Folkesson wrote:
> [External]
>
> Rewrite bindings to use json-schema vocabulary.
Hey,
Overall looks good.
A few comments inline.
Rob may add more.
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
> .../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
>
> 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..1f3136bfffcd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
> @@ -0,0 +1,54 @@
> +# 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:
> + description: SPI chip select number for the device
You can remove description.
It's a standard property.
> + maxItems: 1
> +
> + spi-max-frequency:
> + description: |
> + Definition as per Documentation/devicetree/bindings/spi/spi-
> bus.txt.
> + maximum: 5000000
> + maxItems: 1
I think you can probably remove `spi-max-frequency` from here.
It's documented in the base SPI schema.
> +
> + 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>;
> + };
> + };
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml
2019-11-05 6:42 ` Ardelean, Alexandru
@ 2019-11-05 8:14 ` Marcus Folkesson
0 siblings, 0 replies; 3+ messages in thread
From: Marcus Folkesson @ 2019-11-05 8:14 UTC (permalink / raw)
To: Ardelean, Alexandru
Cc: kent, davem, gregkh, mark.rutland, paulmck, lars, jic23,
knaack.h, pmeerw, robh+dt, mchehab+samsung, devicetree,
linux-kernel, linux-iio
[-- Attachment #1: Type: text/plain, Size: 4801 bytes --]
Hi Alexandru,
See comments below.
On Tue, Nov 05, 2019 at 06:42:06AM +0000, Ardelean, Alexandru wrote:
> On Mon, 2019-11-04 at 18:40 +0100, Marcus Folkesson wrote:
> > [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!
>
> >
> > Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> > ---
> > .../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
> >
> > 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..1f3136bfffcd
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/dac/lltc,ltc1660.yaml
> > @@ -0,0 +1,54 @@
> > +# 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:
> > + description: SPI chip select number for the device
>
> You can remove description.
> It's a standard property.
>
Ok, I will remove it.
> > + maxItems: 1
> > +
> > + spi-max-frequency:
> > + description: |
> > + Definition as per Documentation/devicetree/bindings/spi/spi-
> > bus.txt.
> > + maximum: 5000000
> > + maxItems: 1
>
> I think you can probably remove `spi-max-frequency` from 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.
> > +
> > + 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>;
> > + };
> > + };
> > 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
I guess I wait for Robs review until I post a v2.
Thanks,
Marcus Folkesson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-05 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04 17:40 [PATCH] dt-bindings: iio: dac: Migrate LTC1660 documentation to yaml Marcus Folkesson
2019-11-05 6:42 ` Ardelean, Alexandru
2019-11-05 8:14 ` Marcus Folkesson
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).