diff mbox series

[V4,4/4] dt-bindings: iio: adc: ad7192: Add binding documentation for AD7192

Message ID 20190902130831.23057-4-mircea.caprioru@analog.com (mailing list archive)
State New, archived
Headers show
Series [V4,1/4] iio: adc: ad7192: Add sysfs ABI documentation | expand

Commit Message

Mircea Caprioru Sept. 2, 2019, 1:08 p.m. UTC
This patch add device tree binding documentation for AD7192 adc in YAML
format.

Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
---
Changelog V2:
- no changes here

Changelog V3:
- no changes here

Changelog V4:
- remove the const value from avdd and dvdd supply

 .../bindings/iio/adc/adi,ad7192.yaml          | 119 ++++++++++++++++++
 1 file changed, 119 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml

Comments

Rob Herring (Arm) Sept. 3, 2019, 5:29 p.m. UTC | #1
On Mon, 2 Sep 2019 16:08:31 +0300, Mircea Caprioru wrote:
> This patch add device tree binding documentation for AD7192 adc in YAML
> format.
> 
> Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
> ---
> Changelog V2:
> - no changes here
> 
> Changelog V3:
> - no changes here
> 
> Changelog V4:
> - remove the const value from avdd and dvdd supply
> 
>  .../bindings/iio/adc/adi,ad7192.yaml          | 119 ++++++++++++++++++
>  1 file changed, 119 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron Sept. 8, 2019, 10:29 a.m. UTC | #2
On Tue, 3 Sep 2019 18:29:37 +0100
Rob Herring <robh@kernel.org> wrote:

> On Mon, 2 Sep 2019 16:08:31 +0300, Mircea Caprioru wrote:
> > This patch add device tree binding documentation for AD7192 adc in YAML
> > format.
> > 
> > Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
It seems that I messed up before and didn't actually revert the v3 patch.

I'll roll a small fix patch to bring the tree inline with this and send out to the
list.

Sorry about this. One of many things that went wrong in that last pull request!

Jonathan

> > ---
> > Changelog V2:
> > - no changes here
> > 
> > Changelog V3:
> > - no changes here
> > 
> > Changelog V4:
> > - remove the const value from avdd and dvdd supply
> > 
> >  .../bindings/iio/adc/adi,ad7192.yaml          | 119 ++++++++++++++++++
> >  1 file changed, 119 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Rob Herring (Arm) Oct. 2, 2019, 2:44 p.m. UTC | #3
On Sun, Sep 8, 2019 at 5:29 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Tue, 3 Sep 2019 18:29:37 +0100
> Rob Herring <robh@kernel.org> wrote:
>
> > On Mon, 2 Sep 2019 16:08:31 +0300, Mircea Caprioru wrote:
> > > This patch add device tree binding documentation for AD7192 adc in YAML
> > > format.
> > >
> > > Signed-off-by: Mircea Caprioru <mircea.caprioru@analog.com>
> It seems that I messed up before and didn't actually revert the v3 patch.
>
> I'll roll a small fix patch to bring the tree inline with this and send out to the
> list.
>
> Sorry about this. One of many things that went wrong in that last pull request!

This still has dtc and schema errors:

 DTC     Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml
Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dts:20.13-23:
Warning (reg_format): /example-0/spi0/adc@0:reg: property has invalid
length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml:
Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml:
Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml:
Warning (spi_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dts:18.17-36.15:
Warning (avoid_default_addr_size): /example-0/spi0/adc@0: Relying on
default #address-cells value
Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dts:18.17-36.15:
Warning (avoid_default_addr_size): /example-0/spi0/adc@0: Relying on
default #size-cells value
  CHECK   Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml
/builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml:
adc@0: avdd-supply:0: 'avdd' was expected
/builds/robherring/linux-dt-bindings/Documentation/devicetree/bindings/iio/adc/adi,ad7192.example.dt.yaml:
adc@0: dvdd-supply:0: 'dvdd' was expected
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
new file mode 100644
index 000000000000..040af0bcc92e
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
@@ -0,0 +1,119 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019 Analog Devices Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bindings/iio/adc/adi,ad7192.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7192 ADC device driver
+
+maintainers:
+  - Michael Hennerich <michael.hennerich@analog.com>
+
+description: |
+  Bindings for the Analog Devices AD7192 ADC device. Datasheet can be
+  found here:
+  https://www.analog.com/media/en/technical-documentation/data-sheets/AD7192.pdf
+
+properties:
+  compatible:
+    enum:
+      - adi,ad7190
+      - adi,ad7192
+      - adi,ad7193
+      - adi,ad7195
+
+  reg:
+    maxItems: 1
+
+  spi-cpol: true
+
+  spi-cpha: true
+
+  clocks:
+    maxItems: 1
+    description: phandle to the master clock (mclk)
+
+  clock-names:
+    items:
+      - const: mclk
+
+  interrupts:
+    maxItems: 1
+
+  dvdd-supply:
+    description: DVdd voltage supply
+    maxItems: 1
+
+  avdd-supply:
+    description: AVdd voltage supply
+    maxItems: 1
+
+  adi,rejection-60-Hz-enable:
+    description: |
+      This bit enables a notch at 60 Hz when the first notch of the sinc
+      filter is at 50 Hz. When REJ60 is set, a filter notch is placed at
+      60 Hz when the sinc filter first notch is at 50 Hz. This allows
+      simultaneous 50 Hz/ 60 Hz rejection.
+    type: boolean
+
+  adi,refin2-pins-enable:
+    description: |
+      External reference applied between the P1/REFIN2(+) and P0/REFIN2(−) pins.
+    type: boolean
+
+  adi,buffer-enable:
+    description: |
+      Enables the buffer on the analog inputs. If cleared, the analog inputs
+      are unbuffered, lowering the power consumption of the device. If this
+      bit is set, the analog inputs are buffered, allowing the user to place
+      source impedances on the front end without contributing gain errors to
+      the system.
+    type: boolean
+
+  adi,burnout-currents-enable:
+    description: |
+      When this bit is set to 1, the 500 nA current sources in the signal
+      path are enabled. When BURN = 0, the burnout currents are disabled.
+      The burnout currents can be enabled only when the buffer is active
+      and when chop is disabled.
+    type: boolean
+
+  bipolar:
+    description: see Documentation/devicetree/bindings/iio/adc/adc.txt
+    type: boolean
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+  - dvdd-supply
+  - avdd-supply
+  - spi-cpol
+  - spi-cpha
+
+examples:
+  - |
+    spi0 {
+      adc@0 {
+        compatible = "adi,ad7192";
+        reg = <0>;
+        spi-max-frequency = <1000000>;
+        spi-cpol;
+        spi-cpha;
+        clocks = <&ad7192_mclk>;
+        clock-names = "mclk";
+        #interrupt-cells = <2>;
+        interrupts = <25 0x2>;
+        interrupt-parent = <&gpio>;
+        dvdd-supply = <&dvdd>;
+        avdd-supply = <&avdd>;
+
+        adi,refin2-pins-enable;
+        adi,rejection-60-Hz-enable;
+        adi,buffer-enable;
+        adi,burnout-currents-enable;
+        };
+    };