Skip to contentSkip to conversation

dt-bindings: iio: ti,ads8688 yaml conversion

PATCH In review Jonathan Cameron 3 participants 5 messages Jul 5, 2020 – Jul 18, 2020

Subsystems (2)
lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: iio: ti,ads8688 yaml conversion

From: Jonathan Cameron <[email protected]>

Fairly simple binding. Most of the changes were filling in information not previously found in the binding. I dropped the previous explicit mention of spi-max-frequency as that is covered by the generic SPI binding.

---

Sean, are you fine with being explicitly listed at the maintainer of this binding? Previously we didn't have that formally laid out in the old txt bindings but it's now a required field.

I'm going to slowly work my way through some of the simpler yaml conversions
over the next few months. Of course I welcome anyone else taking
some of these on but for purposes of review, please keep it to only a few at a time.

 .../bindings/iio/adc/ti,ads8688.yaml          | 45 +++++++++++++++++++
 .../bindings/iio/adc/ti-ads8688.txt           | 20 ---------
 2 files changed, 45 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt
Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml new file +45 -0
new file mode 100644
index 000000000000..97fe6cbb2efa
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads8688.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments' ADS8684 and ADS8688 ADC chip
+
+maintainers:
+  - Sean Nyekjaer <[email protected]>
+
+description: |
+   SPI 16bit ADCs with 4/8 channels.
+
+properties:
+  compatible:
+    enum:
+      - ti,ads8684
+      - ti,ads8688
+
+  reg:
+    maxItems: 1
+
+  vref-supply:
+    description: Optional external reference.  If not supplied, assume
+      REFSEL input tied low to enable the internal reference.
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,ads8688";
+            reg = <0>;
+            vref-supply = <&vdd_supply>;
+            spi-max-frequency = <1000000>;
+        };
+    };
+...
Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt deleted +0 -20
deleted file mode 100644
index a02337d7efa4..000000000000
@@ -1,20 +0,0 @@
-* Texas Instruments' ADS8684 and ADS8688 ADC chip
-
-Required properties:
- - compatible: Should be "ti,ads8684" or "ti,ads8688"
- - reg: spi chip select number for the device
-
-Recommended properties:
- - spi-max-frequency: Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Optional properties:
- - vref-supply: The regulator supply for ADC reference voltage
-
-Example:
-adc@0 {
-	compatible = "ti,ads8688";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-	spi-max-frequency = <1000000>;
-};
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Fairly simple binding. Most of the changes were filling in information not previously found in the binding. I dropped the previous explicit mention of spi-max-frequency as that is covered by the generic SPI binding.

Quoted 5 lines

---

Sean, are you fine with being explicitly listed at the maintainer of this binding? Previously we didn't have that formally laid out in the old txt bindings but it's now a required field.

Yes :)

Quoted 89 lines

I'm going to slowly work my way through some of the simpler yaml conversions
over the next few months. Of course I welcome anyone else taking
some of these on but for purposes of review, please keep it to only a few at a time.

  .../bindings/iio/adc/ti,ads8688.yaml          | 45 +++++++++++++++++++
  .../bindings/iio/adc/ti-ads8688.txt           | 20 ---------
  2 files changed, 45 insertions(+), 20 deletions(-)

create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt

Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml new file +45 -0
new file mode 100644
index 000000000000..97fe6cbb2efa
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads8688.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments' ADS8684 and ADS8688 ADC chip
+
+maintainers:
+  - Sean Nyekjaer <[email protected]>
+
+description: |
+   SPI 16bit ADCs with 4/8 channels.
+
+properties:
+  compatible:
+    enum:
+      - ti,ads8684
+      - ti,ads8688
+
+  reg:
+    maxItems: 1
+
+  vref-supply:
+    description: Optional external reference.  If not supplied, assume
+      REFSEL input tied low to enable the internal reference.
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@0 {
+            compatible = "ti,ads8688";
+            reg = <0>;
+            vref-supply = <&vdd_supply>;
+            spi-max-frequency = <1000000>;
+        };
+    };
+...
Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt deleted +0 -20
deleted file mode 100644
index a02337d7efa4..000000000000
@@ -1,20 +0,0 @@
-* Texas Instruments' ADS8684 and ADS8688 ADC chip
-
-Required properties:
- - compatible: Should be "ti,ads8684" or "ti,ads8688"
- - reg: spi chip select number for the device
-
-Recommended properties:
- - spi-max-frequency: Definition as per
-		Documentation/devicetree/bindings/spi/spi-bus.txt
-
-Optional properties:
- - vref-supply: The regulator supply for ADC reference voltage
-
-Example:
-adc@0 {
-	compatible = "ti,ads8688";
-	reg = <0>;
-	vref-supply = <&vdd_supply>;
-	spi-max-frequency = <1000000>;
-};
maintainer
#2 lore raw
In reply to Jonathan Cameron
Quoted 11 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Fairly simple binding. Most of the changes were filling in information not previously found in the binding. I dropped the previous explicit mention of spi-max-frequency as that is covered by the generic SPI binding.

---

Quoted 8 lines

Sean, are you fine with being explicitly listed at the maintainer of this binding? Previously we didn't have that formally laid out in the old txt bindings but it's now a required field.

I'm going to slowly work my way through some of the simpler yaml conversions
over the next few months. Of course I welcome anyone else taking
some of these on but for purposes of review, please keep it to only a few at a time.

Actually, I'd really prefer a bunch at a time if it is by one person. Not because I need more to review :P, but then all the mistakes are the same and can be fixed in one go. I have a script[1] I use that does some of the boilerplate, but not the hard part (properties). It works best if you tweak the template with what's common for a set of bindings.

Rob

[1] https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=yaml-bindings-v2

author maintainer
#3 lore raw
Quoted 21 lines · On Wed, 15 Jul 2020 15:57:44 -0600 Rob Herring <[email protected]> wrote:
Quoted 11 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Fairly simple binding. Most of the changes were filling in information not previously found in the binding. I dropped the previous explicit mention of spi-max-frequency as that is covered by the generic SPI binding.

---

Quoted 8 lines

Sean, are you fine with being explicitly listed at the maintainer of this binding? Previously we didn't have that formally laid out in the old txt bindings but it's now a required field.

I'm going to slowly work my way through some of the simpler yaml conversions
over the next few months. Of course I welcome anyone else taking
some of these on but for purposes of review, please keep it to only a few at a time.

Quoted 5 lines

Actually, I'd really prefer a bunch at a time if it is by one person. Not because I need more to review :P, but then all the mistakes are the same and can be fixed in one go. I have a script[1] I use that does some of the boilerplate, but not the hard part (properties). It works best if you tweak the template with what's common for a set of bindings.

Fair enough. Let the deluge begin :)

Applied this one to the togreg branch of iio.git and pushed out as testing for the autobuilders to probably ignore it.

Thanks,

Jonathan

Quoted 4 lines

Rob

[1] https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=yaml-bindings-v2

maintainer Reviewed-by on v1 1/1
#4 lore raw
In reply to Jonathan Cameron
Quoted 20 lines · Jonathan Cameron

From: Jonathan Cameron <[email protected]>

Fairly simple binding. Most of the changes were filling in information not previously found in the binding. I dropped the previous explicit mention of spi-max-frequency as that is covered by the generic SPI binding.

---

Sean, are you fine with being explicitly listed at the maintainer of this binding? Previously we didn't have that formally laid out in the old txt bindings but it's now a required field.

I'm going to slowly work my way through some of the simpler yaml conversions
over the next few months. Of course I welcome anyone else taking
some of these on but for purposes of review, please keep it to only a few at a time.

Quoted 6 lines
 .../bindings/iio/adc/ti,ads8688.yaml          | 45 +++++++++++++++++++
 .../bindings/iio/adc/ti-ads8688.txt           | 20 ---------
 2 files changed, 45 insertions(+), 20 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
 delete mode 100644 Documentation/devicetree/bindings/iio/adc/ti-ads8688.txt