All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
@ 2018-10-18  9:12 ` Stefan Popa
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Popa @ 2018-10-18  9:12 UTC (permalink / raw)
  To: jic23, robh+dt, mark.rutland
  Cc: knaack.h, lars, pmeerw, Michael.Hennerich, gregkh, linux-iio,
	devicetree, linux-kernel, stefan.popa

Document support for AD7606 Analog to Digital Converter.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
---
 .../devicetree/bindings/iio/adc/adi,ad7606.txt     | 51 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
new file mode 100644
index 0000000..dede581
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
@@ -0,0 +1,51 @@
+Analog Devices AD7606 Simultaneous Sampling ADC
+
+Required properties for the AD7606:
+
+ - compatible: Must be one of "adi,ad7605-4", "adi,ad7606-8", "adi,ad7606-6" or
+ 	       "adi,ad7606-4".
+ - reg: SPI chip select number for the device
+ - spi-max-frequency: Max SPI frequency to use
+ 	see: Documentation/devicetree/bindings/spi/spi-bus.txt
+ - spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
+ - avcc-supply: phandle to the Avcc power supply
+ - interrupts: IRQ line for the ADC
+ 	see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+ - conversion-start-gpio: must be the device tree identifier of the CONVST pin.
+			  This logic input is used to initiate conversions on
+			  the analog input channels.
+
+Optional properties:
+
+ - reset-gpio: must be the device tree identifier of the RESET pin. If specified,
+ 	       it will be asserted during driver probe.
+ - first-data-gpio: must be the device tree identifier of the FRSTDATA pin.
+ 		    The FRSTDATA output indicates when the first channel, V1, is
+		    being read back on either the parallel, byte or serial interface.
+- standby-gpio: must be the device tree identifier of the STBY pin. This pin is used
+		to place the AD7606 into one of two power-down modes, Standby mode or
+		Shutdown mode.
+- range-gpio: must be the device tree identifier of the RANGE pin. The polarity on
+	      this pin determines the input range of the analog input channels. If
+	      this pin is tied to a logic high, the analog input range is ±10V for
+	      allchannels. If this pin is tied to a logic low, the analog input range
+	      is ±5V for all channels.
+
+Example:
+
+	adc@0 {
+		compatible = "adi,ad7606-8";
+		reg = <0>;
+		spi-max-frequency = <1000000>;
+		spi-cpol;
+
+		avcc-supply = <&adc_vref>;
+
+		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-parent = <&gpio>;
+
+		conversion-start-gpio = <&gpio 17 0>;
+		reset-gpio = <&gpio 27 0>;
+		first-data-gpio = <&gpio 22 0>;
+		standby-gpio = <&gpio 24 0>;
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index 843545d..6d63db4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -845,6 +845,7 @@ L:	linux-iio@vger.kernel.org
 W:	http://ez.analog.com/community/linux-device-drivers
 S:	Supported
 F:	drivers/iio/adc/ad7606.c
+F:	Documentation/devicetree/bindings/iio/adc/ad7606.txt
 
 ANALOG DEVICES INC AD9389B DRIVER
 M:	Hans Verkuil <hans.verkuil@cisco.com>
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
@ 2018-10-18  9:12 ` Stefan Popa
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Popa @ 2018-10-18  9:12 UTC (permalink / raw)
  To: jic23, robh+dt, mark.rutland
  Cc: knaack.h, lars, pmeerw, Michael.Hennerich, gregkh, linux-iio,
	devicetree, linux-kernel, stefan.popa

Document support for AD7606 Analog to Digital Converter.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
---
 .../devicetree/bindings/iio/adc/adi,ad7606.txt     | 51 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
new file mode 100644
index 0000000..dede581
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
@@ -0,0 +1,51 @@
+Analog Devices AD7606 Simultaneous Sampling ADC
+
+Required properties for the AD7606:
+
+ - compatible: Must be one of "adi,ad7605-4", "adi,ad7606-8", "adi,ad7606-6" or
+ 	       "adi,ad7606-4".
+ - reg: SPI chip select number for the device
+ - spi-max-frequency: Max SPI frequency to use
+ 	see: Documentation/devicetree/bindings/spi/spi-bus.txt
+ - spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
+ - avcc-supply: phandle to the Avcc power supply
+ - interrupts: IRQ line for the ADC
+ 	see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+ - conversion-start-gpio: must be the device tree identifier of the CONVST pin.
+			  This logic input is used to initiate conversions on
+			  the analog input channels.
+
+Optional properties:
+
+ - reset-gpio: must be the device tree identifier of the RESET pin. If specified,
+ 	       it will be asserted during driver probe.
+ - first-data-gpio: must be the device tree identifier of the FRSTDATA pin.
+ 		    The FRSTDATA output indicates when the first channel, V1, is
+		    being read back on either the parallel, byte or serial interface.
+- standby-gpio: must be the device tree identifier of the STBY pin. This pin is used
+		to place the AD7606 into one of two power-down modes, Standby mode or
+		Shutdown mode.
+- range-gpio: must be the device tree identifier of the RANGE pin. The polarity on
+	      this pin determines the input range of the analog input channels. If
+	      this pin is tied to a logic high, the analog input range is ±10V for
+	      allchannels. If this pin is tied to a logic low, the analog input range
+	      is ±5V for all channels.
+
+Example:
+
+	adc@0 {
+		compatible = "adi,ad7606-8";
+		reg = <0>;
+		spi-max-frequency = <1000000>;
+		spi-cpol;
+
+		avcc-supply = <&adc_vref>;
+
+		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
+		interrupt-parent = <&gpio>;
+
+		conversion-start-gpio = <&gpio 17 0>;
+		reset-gpio = <&gpio 27 0>;
+		first-data-gpio = <&gpio 22 0>;
+		standby-gpio = <&gpio 24 0>;
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index 843545d..6d63db4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -845,6 +845,7 @@ L:	linux-iio@vger.kernel.org
 W:	http://ez.analog.com/community/linux-device-drivers
 S:	Supported
 F:	drivers/iio/adc/ad7606.c
+F:	Documentation/devicetree/bindings/iio/adc/ad7606.txt
 
 ANALOG DEVICES INC AD9389B DRIVER
 M:	Hans Verkuil <hans.verkuil@cisco.com>
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
  2018-10-18  9:12 ` Stefan Popa
@ 2018-10-18 10:35   ` Ardelean, Alexandru
  -1 siblings, 0 replies; 7+ messages in thread
From: Ardelean, Alexandru @ 2018-10-18 10:35 UTC (permalink / raw)
  To: mark.rutland, Popa, Stefan Serban, jic23, robh+dt
  Cc: linux-kernel, lars, knaack.h, devicetree, Hennerich, Michael,
	linux-iio, pmeerw, gregkh

On Thu, 2018-10-18 at 12:12 +0300, Stefan Popa wrote:
> Document support for AD7606 Analog to Digital Converter.
> 

Commments inline

> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> ---
>  .../devicetree/bindings/iio/adc/adi,ad7606.txt     | 51
> ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 52 insertions(+)
>  create mode 100644
> Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> new file mode 100644
> index 0000000..dede581
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> @@ -0,0 +1,51 @@
> +Analog Devices AD7606 Simultaneous Sampling ADC
> +
> +Required properties for the AD7606:
> +
> + - compatible: Must be one of "adi,ad7605-4", "adi,ad7606-8",
> "adi,ad7606-6" or
> + 	       "adi,ad7606-4".
> + - reg: SPI chip select number for the device
> + - spi-max-frequency: Max SPI frequency to use
> + 	see: Documentation/devicetree/bindings/spi/spi-bus.txt
> + - spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt

I don't know what the typical preference is (with respect to SPI docs), but
I'd just reference the "Documentation/devicetree/bindings/spi/spi-bus.txt
"doc here.

> + - avcc-supply: phandle to the Avcc power supply
> + - interrupts: IRQ line for the ADC
> + 	see: Documentation/devicetree/bindings/interrupt-
> controller/interrupts.txt
> + - conversion-start-gpio: must be the device tree identifier of the
> CONVST pin.
> +			  This logic input is used to initiate conversions
> on
> +			  the analog input channels.
> +
> +Optional properties:
> +
> + - reset-gpio: must be the device tree identifier of the RESET pin. If
> specified,
> + 	       it will be asserted during driver probe.
> + - first-data-gpio: must be the device tree identifier of the FRSTDATA
> pin.
> + 		    The FRSTDATA output indicates when the first channel,
> V1, is
> +		    being read back on either the parallel, byte or serial
> interface.
> +- standby-gpio: must be the device tree identifier of the STBY pin. This
> pin is used
> +		to place the AD7606 into one of two power-down modes,
> Standby mode or
> +		Shutdown mode.
> +- range-gpio: must be the device tree identifier of the RANGE pin. The
> polarity on
> +	      this pin determines the input range of the analog input
> channels. If
> +	      this pin is tied to a logic high, the analog input range is
> ±10V for
> +	      allchannels. If this pin is tied to a logic low, the analog
> input range
> +	      is ±5V for all channels.
> +

nitpick: `range-gpio` && `standby-gpio` entries are indented differently
than `reset-gpio` && `first-data-gpio`

> +Example:
> +
> +	adc@0 {
> +		compatible = "adi,ad7606-8";
> +		reg = <0>;
> +		spi-max-frequency = <1000000>;
> +		spi-cpol;
> +
> +		avcc-supply = <&adc_vref>;
> +
> +		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
> +		interrupt-parent = <&gpio>;
> +
> +		conversion-start-gpio = <&gpio 17 0>;
> +		reset-gpio = <&gpio 27 0>;
> +		first-data-gpio = <&gpio 22 0>;
> +		standby-gpio = <&gpio 24 0>;
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 843545d..6d63db4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -845,6 +845,7 @@ L:	linux-iio@vger.kernel.org
>  W:	http://ez.analog.com/community/linux-device-drivers
>  S:	Supported
>  F:	drivers/iio/adc/ad7606.c
> +F:	Documentation/devicetree/bindings/iio/adc/ad7606.txt
>  
>  ANALOG DEVICES INC AD9389B DRIVER
>  M:	Hans Verkuil <hans.verkuil@cisco.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
@ 2018-10-18 10:35   ` Ardelean, Alexandru
  0 siblings, 0 replies; 7+ messages in thread
From: Ardelean, Alexandru @ 2018-10-18 10:35 UTC (permalink / raw)
  To: mark.rutland, Popa, Stefan Serban, jic23, robh+dt
  Cc: linux-kernel, lars, knaack.h, devicetree, Hennerich, Michael,
	linux-iio, pmeerw, gregkh

T24gVGh1LCAyMDE4LTEwLTE4IGF0IDEyOjEyICswMzAwLCBTdGVmYW4gUG9wYSB3cm90ZToNCj4g
RG9jdW1lbnQgc3VwcG9ydCBmb3IgQUQ3NjA2IEFuYWxvZyB0byBEaWdpdGFsIENvbnZlcnRlci4N
Cj4gDQoNCkNvbW1tZW50cyBpbmxpbmUNCg0KPiBTaWduZWQtb2ZmLWJ5OiBTdGVmYW4gUG9wYSA8
c3RlZmFuLnBvcGFAYW5hbG9nLmNvbT4NCj4gLS0tDQo+ICAuLi4vZGV2aWNldHJlZS9iaW5kaW5n
cy9paW8vYWRjL2FkaSxhZDc2MDYudHh0ICAgICB8IDUxDQo+ICsrKysrKysrKysrKysrKysrKysr
KysNCj4gIE1BSU5UQUlORVJTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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L2V6LmFuYWxvZy5jb20v
Y29tbXVuaXR5L2xpbnV4LWRldmljZS1kcml2ZXJzDQo+ICBTOglTdXBwb3J0ZWQNCj4gIEY6CWRy
aXZlcnMvaWlvL2FkYy9hZDc2MDYuYw0KPiArRjoJRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2Jp
bmRpbmdzL2lpby9hZGMvYWQ3NjA2LnR4dA0KPiAgDQo+ICBBTkFMT0cgREVWSUNFUyBJTkMgQUQ5
Mzg5QiBEUklWRVINCj4gIE06CUhhbnMgVmVya3VpbCA8aGFucy52ZXJrdWlsQGNpc2NvLmNvbT4N
Cg==

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
  2018-10-18  9:12 ` Stefan Popa
  (?)
  (?)
@ 2018-10-25 18:43 ` Rob Herring
  2018-10-28 12:07     ` Jonathan Cameron
  -1 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-10-25 18:43 UTC (permalink / raw)
  To: Stefan Popa
  Cc: jic23, mark.rutland, knaack.h, lars, pmeerw, Michael.Hennerich,
	gregkh, linux-iio, devicetree, linux-kernel

On Thu, Oct 18, 2018 at 12:12:36PM +0300, Stefan Popa wrote:
> Document support for AD7606 Analog to Digital Converter.
> 
> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> ---
>  .../devicetree/bindings/iio/adc/adi,ad7606.txt     | 51 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 52 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> new file mode 100644
> index 0000000..dede581
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> @@ -0,0 +1,51 @@
> +Analog Devices AD7606 Simultaneous Sampling ADC
> +
> +Required properties for the AD7606:
> +
> + - compatible: Must be one of "adi,ad7605-4", "adi,ad7606-8", "adi,ad7606-6" or
> + 	       "adi,ad7606-4".

Format as one per line please.

> + - reg: SPI chip select number for the device
> + - spi-max-frequency: Max SPI frequency to use
> + 	see: Documentation/devicetree/bindings/spi/spi-bus.txt
> + - spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
> + - avcc-supply: phandle to the Avcc power supply
> + - interrupts: IRQ line for the ADC
> + 	see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> + - conversion-start-gpio: must be the device tree identifier of the CONVST pin.
> +			  This logic input is used to initiate conversions on
> +			  the analog input channels.

Doesn't IIO have trigger GPIOs?

> +
> +Optional properties:
> +
> + - reset-gpio: must be the device tree identifier of the RESET pin. If specified,
> + 	       it will be asserted during driver probe.

-gpios is the preferred form: reset-gpios

And state the active state

> + - first-data-gpio: must be the device tree identifier of the FRSTDATA pin.
> + 		    The FRSTDATA output indicates when the first channel, V1, is
> +		    being read back on either the parallel, byte or serial interface.
> +- standby-gpio: must be the device tree identifier of the STBY pin. This pin is used
> +		to place the AD7606 into one of two power-down modes, Standby mode or
> +		Shutdown mode.
> +- range-gpio: must be the device tree identifier of the RANGE pin. The polarity on
> +	      this pin determines the input range of the analog input channels. If
> +	      this pin is tied to a logic high, the analog input range is ±10V for
> +	      allchannels. If this pin is tied to a logic low, the analog input range

s/allchannels/all channels/

> +	      is ±5V for all channels.

conversion-start-gpio, first-data-gpio, and range-gpio should all have 
vendor prefix (in addition to -gpios).

> +
> +Example:
> +
> +	adc@0 {
> +		compatible = "adi,ad7606-8";
> +		reg = <0>;
> +		spi-max-frequency = <1000000>;
> +		spi-cpol;
> +
> +		avcc-supply = <&adc_vref>;
> +
> +		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
> +		interrupt-parent = <&gpio>;
> +
> +		conversion-start-gpio = <&gpio 17 0>;
> +		reset-gpio = <&gpio 27 0>;
> +		first-data-gpio = <&gpio 22 0>;
> +		standby-gpio = <&gpio 24 0>;
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 843545d..6d63db4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -845,6 +845,7 @@ L:	linux-iio@vger.kernel.org
>  W:	http://ez.analog.com/community/linux-device-drivers
>  S:	Supported
>  F:	drivers/iio/adc/ad7606.c
> +F:	Documentation/devicetree/bindings/iio/adc/ad7606.txt
>  
>  ANALOG DEVICES INC AD9389B DRIVER
>  M:	Hans Verkuil <hans.verkuil@cisco.com>
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
  2018-10-25 18:43 ` Rob Herring
@ 2018-10-28 12:07     ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2018-10-28 12:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: Stefan Popa, mark.rutland, knaack.h, lars, pmeerw,
	Michael.Hennerich, gregkh, linux-iio, devicetree, linux-kernel

On Thu, 25 Oct 2018 13:43:26 -0500
Rob Herring <robh@kernel.org> wrote:

> On Thu, Oct 18, 2018 at 12:12:36PM +0300, Stefan Popa wrote:
> > Document support for AD7606 Analog to Digital Converter.
> > 
> > Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> > ---
> >  .../devicetree/bindings/iio/adc/adi,ad7606.txt     | 51 ++++++++++++++++++++++
> >  MAINTAINERS                                        |  1 +
> >  2 files changed, 52 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> > new file mode 100644
> > index 0000000..dede581
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> > @@ -0,0 +1,51 @@
> > +Analog Devices AD7606 Simultaneous Sampling ADC
> > +
> > +Required properties for the AD7606:
> > +
> > + - compatible: Must be one of "adi,ad7605-4", "adi,ad7606-8", "adi,ad7606-6" or
> > + 	       "adi,ad7606-4".  
> 
> Format as one per line please.
> 
> > + - reg: SPI chip select number for the device
> > + - spi-max-frequency: Max SPI frequency to use
> > + 	see: Documentation/devicetree/bindings/spi/spi-bus.txt
> > + - spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
> > + - avcc-supply: phandle to the Avcc power supply
> > + - interrupts: IRQ line for the ADC
> > + 	see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> > + - conversion-start-gpio: must be the device tree identifier of the CONVST pin.
> > +			  This logic input is used to initiate conversions on
> > +			  the analog input channels.  
> 
> Doesn't IIO have trigger GPIOs?

Wrong way around.  Those are for when you want to use a GPIO to tell the OS
to grab data now.  This one is a 'capture now' pin used to cause the hardware
to start capturing.  We might be able to do something a little generic around
this type, but I don't think we would gain much doing it.

The more interesting point is that the real reason devices have these is either:
1) To capture synchronized data cross a bank of ADCs
2) To capture data under control of device not visible to the OS (some sort
of external controller).

Neither of these cases is terribly well handled at the moment. However, no
one has yet really expressed a desire to do so, hence maybe it's not actually
done...

The first option would need a 'hardware' trigger path which isn't something
we really do as yet in general.  We have individual drivers doing it but normally
only when it's routing a pulse signal to cause the hardware to fill a fifo and
the OS only gets involved occasionally.

Ah well, if anyone cares we'll figure out how to do it ;) 

> 
> > +
> > +Optional properties:
> > +
> > + - reset-gpio: must be the device tree identifier of the RESET pin. If specified,
> > + 	       it will be asserted during driver probe.  
> 
> -gpios is the preferred form: reset-gpios
> 
> And state the active state
> 
> > + - first-data-gpio: must be the device tree identifier of the FRSTDATA pin.
> > + 		    The FRSTDATA output indicates when the first channel, V1, is
> > +		    being read back on either the parallel, byte or serial interface.
> > +- standby-gpio: must be the device tree identifier of the STBY pin. This pin is used
> > +		to place the AD7606 into one of two power-down modes, Standby mode or
> > +		Shutdown mode.
> > +- range-gpio: must be the device tree identifier of the RANGE pin. The polarity on
> > +	      this pin determines the input range of the analog input channels. If
> > +	      this pin is tied to a logic high, the analog input range is ±10V for
> > +	      allchannels. If this pin is tied to a logic low, the analog input range  
> 
> s/allchannels/all channels/
> 
> > +	      is ±5V for all channels.  
> 
> conversion-start-gpio, first-data-gpio, and range-gpio should all have 
> vendor prefix (in addition to -gpios).
Gah, I should have spotted all of that.  Thanks Rob!

Jonathan
> 
> > +
> > +Example:
> > +
> > +	adc@0 {
> > +		compatible = "adi,ad7606-8";
> > +		reg = <0>;
> > +		spi-max-frequency = <1000000>;
> > +		spi-cpol;
> > +
> > +		avcc-supply = <&adc_vref>;
> > +
> > +		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
> > +		interrupt-parent = <&gpio>;
> > +
> > +		conversion-start-gpio = <&gpio 17 0>;
> > +		reset-gpio = <&gpio 27 0>;
> > +		first-data-gpio = <&gpio 22 0>;
> > +		standby-gpio = <&gpio 24 0>;
> > +	};
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 843545d..6d63db4 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -845,6 +845,7 @@ L:	linux-iio@vger.kernel.org
> >  W:	http://ez.analog.com/community/linux-device-drivers
> >  S:	Supported
> >  F:	drivers/iio/adc/ad7606.c
> > +F:	Documentation/devicetree/bindings/iio/adc/ad7606.txt
> >  
> >  ANALOG DEVICES INC AD9389B DRIVER
> >  M:	Hans Verkuil <hans.verkuil@cisco.com>
> > -- 
> > 2.7.4
> >   


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC
@ 2018-10-28 12:07     ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2018-10-28 12:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: Stefan Popa, mark.rutland, knaack.h, lars, pmeerw,
	Michael.Hennerich, gregkh, linux-iio, devicetree, linux-kernel

On Thu, 25 Oct 2018 13:43:26 -0500
Rob Herring <robh@kernel.org> wrote:

> On Thu, Oct 18, 2018 at 12:12:36PM +0300, Stefan Popa wrote:
> > Document support for AD7606 Analog to Digital Converter.
> >=20
> > Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> > ---
> >  .../devicetree/bindings/iio/adc/adi,ad7606.txt     | 51 ++++++++++++++=
++++++++
> >  MAINTAINERS                                        |  1 +
> >  2 files changed, 52 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad760=
6.txt
> >=20
> > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt b=
/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> > new file mode 100644
> > index 0000000..dede581
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.txt
> > @@ -0,0 +1,51 @@
> > +Analog Devices AD7606 Simultaneous Sampling ADC
> > +
> > +Required properties for the AD7606:
> > +
> > + - compatible: Must be one of "adi,ad7605-4", "adi,ad7606-8", "adi,ad7=
606-6" or
> > + 	       "adi,ad7606-4". =20
>=20
> Format as one per line please.
>=20
> > + - reg: SPI chip select number for the device
> > + - spi-max-frequency: Max SPI frequency to use
> > + 	see: Documentation/devicetree/bindings/spi/spi-bus.txt
> > + - spi-cpha: See Documentation/devicetree/bindings/spi/spi-bus.txt
> > + - avcc-supply: phandle to the Avcc power supply
> > + - interrupts: IRQ line for the ADC
> > + 	see: Documentation/devicetree/bindings/interrupt-controller/interrup=
ts.txt
> > + - conversion-start-gpio: must be the device tree identifier of the CO=
NVST pin.
> > +			  This logic input is used to initiate conversions on
> > +			  the analog input channels. =20
>=20
> Doesn't IIO have trigger GPIOs?

Wrong way around.  Those are for when you want to use a GPIO to tell the OS
to grab data now.  This one is a 'capture now' pin used to cause the hardwa=
re
to start capturing.  We might be able to do something a little generic arou=
nd
this type, but I don't think we would gain much doing it.

The more interesting point is that the real reason devices have these is ei=
ther:
1) To capture synchronized data cross a bank of ADCs
2) To capture data under control of device not visible to the OS (some sort
of external controller).

Neither of these cases is terribly well handled at the moment. However, no
one has yet really expressed a desire to do so, hence maybe it's not actual=
ly
done...

The first option would need a 'hardware' trigger path which isn't something
we really do as yet in general.  We have individual drivers doing it but no=
rmally
only when it's routing a pulse signal to cause the hardware to fill a fifo =
and
the OS only gets involved occasionally.

Ah well, if anyone cares we'll figure out how to do it ;)=20

>=20
> > +
> > +Optional properties:
> > +
> > + - reset-gpio: must be the device tree identifier of the RESET pin. If=
 specified,
> > + 	       it will be asserted during driver probe. =20
>=20
> -gpios is the preferred form: reset-gpios
>=20
> And state the active state
>=20
> > + - first-data-gpio: must be the device tree identifier of the FRSTDATA=
 pin.
> > + 		    The FRSTDATA output indicates when the first channel, V1, is
> > +		    being read back on either the parallel, byte or serial interface.
> > +- standby-gpio: must be the device tree identifier of the STBY pin. Th=
is pin is used
> > +		to place the AD7606 into one of two power-down modes, Standby mode or
> > +		Shutdown mode.
> > +- range-gpio: must be the device tree identifier of the RANGE pin. The=
 polarity on
> > +	      this pin determines the input range of the analog input channel=
s. If
> > +	      this pin is tied to a logic high, the analog input range is =C2=
=B110V for
> > +	      allchannels. If this pin is tied to a logic low, the analog inp=
ut range =20
>=20
> s/allchannels/all channels/
>=20
> > +	      is =C2=B15V for all channels. =20
>=20
> conversion-start-gpio, first-data-gpio, and range-gpio should all have=20
> vendor prefix (in addition to -gpios).
Gah, I should have spotted all of that.  Thanks Rob!

Jonathan
>=20
> > +
> > +Example:
> > +
> > +	adc@0 {
> > +		compatible =3D "adi,ad7606-8";
> > +		reg =3D <0>;
> > +		spi-max-frequency =3D <1000000>;
> > +		spi-cpol;
> > +
> > +		avcc-supply =3D <&adc_vref>;
> > +
> > +		interrupts =3D <25 IRQ_TYPE_EDGE_FALLING>;
> > +		interrupt-parent =3D <&gpio>;
> > +
> > +		conversion-start-gpio =3D <&gpio 17 0>;
> > +		reset-gpio =3D <&gpio 27 0>;
> > +		first-data-gpio =3D <&gpio 22 0>;
> > +		standby-gpio =3D <&gpio 24 0>;
> > +	};
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index 843545d..6d63db4 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -845,6 +845,7 @@ L:	linux-iio@vger.kernel.org
> >  W:	http://ez.analog.com/community/linux-device-drivers
> >  S:	Supported
> >  F:	drivers/iio/adc/ad7606.c
> > +F:	Documentation/devicetree/bindings/iio/adc/ad7606.txt
> > =20
> >  ANALOG DEVICES INC AD9389B DRIVER
> >  M:	Hans Verkuil <hans.verkuil@cisco.com>
> > --=20
> > 2.7.4
> >  =20

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-10-28 20:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18  9:12 [PATCH 2/2] dt-bindings: iio: adc: Add docs for AD7606 ADC Stefan Popa
2018-10-18  9:12 ` Stefan Popa
2018-10-18 10:35 ` Ardelean, Alexandru
2018-10-18 10:35   ` Ardelean, Alexandru
2018-10-25 18:43 ` Rob Herring
2018-10-28 12:07   ` Jonathan Cameron
2018-10-28 12:07     ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.