diff mbox series

[v3,3/5] dt-bindings: iio: ad7949: Add adi,reference-select

Message ID 1557759185-167857-3-git-send-email-adam.michaelis@rockwellcollins.com (mailing list archive)
State New, archived
Headers show
Series [v3,1/5] iio: ad7949: Fix dummy read cycle placement | expand

Commit Message

Adam Michaelis May 13, 2019, 2:53 p.m. UTC
Adding optional parameter to AD7949 to specify the source for the
reference voltage signal. Default value is maintained with option '3' to
match previous version of driver.

Signed-off-by: Adam Michaelis <adam.michaelis@rockwellcollins.com>
---
	V2:
	- Add some defines to reduce use of magic numbers.
	V3:
	- Re-think usage of device tree parameter to focus on the
	actual reference sources instead of the raw hardware
	configuration.
---
 .../devicetree/bindings/iio/adc/ad7949.txt          | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

Comments

Rob Herring May 14, 2019, 6:23 p.m. UTC | #1
On Mon, 13 May 2019 09:53:03 -0500, Adam Michaelis wrote:
> Adding optional parameter to AD7949 to specify the source for the
> reference voltage signal. Default value is maintained with option '3' to
> match previous version of driver.
> 
> Signed-off-by: Adam Michaelis <adam.michaelis@rockwellcollins.com>
> ---
> 	V2:
> 	- Add some defines to reduce use of magic numbers.
> 	V3:
> 	- Re-think usage of device tree parameter to focus on the
> 	actual reference sources instead of the raw hardware
> 	configuration.
> ---
>  .../devicetree/bindings/iio/adc/ad7949.txt          | 21 +++++++++++++++++++--
>  1 file changed, 19 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Jonathan Cameron May 18, 2019, 9:07 a.m. UTC | #2
On Tue, 14 May 2019 13:23:11 -0500
Rob Herring <robh@kernel.org> wrote:

> On Mon, 13 May 2019 09:53:03 -0500, Adam Michaelis wrote:
> > Adding optional parameter to AD7949 to specify the source for the
> > reference voltage signal. Default value is maintained with option '3' to
> > match previous version of driver.
> > 
> > Signed-off-by: Adam Michaelis <adam.michaelis@rockwellcollins.com>
> > ---
> > 	V2:
> > 	- Add some defines to reduce use of magic numbers.
> > 	V3:
> > 	- Re-think usage of device tree parameter to focus on the
> > 	actual reference sources instead of the raw hardware
> > 	configuration.
> > ---
> >  .../devicetree/bindings/iio/adc/ad7949.txt          | 21 +++++++++++++++++++--
> >  1 file changed, 19 insertions(+), 2 deletions(-)
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Looks fine to me as well. Analog review awaited before applying.
For reference
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Alexandru Ardelean May 23, 2019, 12:16 p.m. UTC | #3
On Sat, May 18, 2019 at 12:08 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Tue, 14 May 2019 13:23:11 -0500
> Rob Herring <robh@kernel.org> wrote:
>
> > On Mon, 13 May 2019 09:53:03 -0500, Adam Michaelis wrote:
> > > Adding optional parameter to AD7949 to specify the source for the
> > > reference voltage signal. Default value is maintained with option '3' to
> > > match previous version of driver.
> > >
> > > Signed-off-by: Adam Michaelis <adam.michaelis@rockwellcollins.com>
> > > ---
> > >     V2:
> > >     - Add some defines to reduce use of magic numbers.
> > >     V3:
> > >     - Re-think usage of device tree parameter to focus on the
> > >     actual reference sources instead of the raw hardware
> > >     configuration.
> > > ---
> > >  .../devicetree/bindings/iio/adc/ad7949.txt          | 21 +++++++++++++++++++--
> > >  1 file changed, 19 insertions(+), 2 deletions(-)
> > >
> >
> > Reviewed-by: Rob Herring <robh@kernel.org>
> Looks fine to me as well. Analog review awaited before applying.
> For reference
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

CC-ing my work email

Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/ad7949.txt b/Documentation/devicetree/bindings/iio/adc/ad7949.txt
index c7f5057356b1..e5152335c761 100644
--- a/Documentation/devicetree/bindings/iio/adc/ad7949.txt
+++ b/Documentation/devicetree/bindings/iio/adc/ad7949.txt
@@ -6,11 +6,28 @@  Required properties:
 	* "adi,ad7682"
 	* "adi,ad7689"
  - reg: spi chip select number for the device
- - vref-supply: The regulator supply for ADC reference voltage
 
-Example:
+Optional properties:
+ - adi,reference-select: Select the reference voltage source to use
+ when converting the input voltages. Valid values are:
+   0: Internal 2.5V reference;
+   1: Internal 4.096V reference;
+   2: External REF reference;
+   3: External REFIN reference (default);
+ - vref-supply: The regulator supply for external ADC reference voltage.
+ Required if one of the external references is selected by
+ 'adi,reference-select'.
+
+Examples:
 adc@0 {
 	compatible = "adi,ad7949";
 	reg = <0>;
+	adi,reference-select = <2>;
 	vref-supply = <&vdd_supply>;
 };
+
+adc@0 {
+	compatible = "adi,ad7949";
+	reg = <0>;
+	adi,reference-select = <0>;
+};