linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file
@ 2018-11-13 11:21 Stefan Popa
  2018-11-16 18:38 ` Jonathan Cameron
  2018-11-16 22:53 ` Rob Herring
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Popa @ 2018-11-13 11:21 UTC (permalink / raw)
  To: jic23, robh+dt
  Cc: mark.rutland, knaack.h, lars, pmeerw, Michael.Hennerich, gregkh,
	linux-iio, devicetree, linux-kernel, stefan.popa

There are several ADC drivers that depend on the same device tree
bindings. Rather than continue to duplicate the properties, this patch
adds a common adc binding document that can be referenced. For beginning,
only two properties are documented.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
---
Changes in v2, v3:
	- N/A.
Changes in v4:
	- Added this commit.
Changes in v5:
	- Nothing changed.

 Documentation/devicetree/bindings/iio/adc/adc.txt | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adc.txt

diff --git a/Documentation/devicetree/bindings/iio/adc/adc.txt b/Documentation/devicetree/bindings/iio/adc/adc.txt
new file mode 100644
index 0000000..5bbaa33
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adc.txt
@@ -0,0 +1,23 @@
+Common ADCs properties
+
+Optional properties for child nodes:
+- bipolar : Boolean, if set the channel is used in bipolar mode.
+- diff-channels : Differential channels muxed for this ADC. The first value
+		specifies the positive input pin, the second value the negative
+		input pin.
+
+Example:
+	adc@0 {
+		compatible = "some,adc";
+		...
+		channel@0 {
+			bipolar;
+			diff-channels = <0 1>;
+			...
+		};
+
+		channel@1 {
+			diff-channels = <2 3>;
+			...
+		};
+	};
-- 
2.7.4


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

* Re: [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file
  2018-11-13 11:21 [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file Stefan Popa
@ 2018-11-16 18:38 ` Jonathan Cameron
  2018-11-16 22:53   ` Rob Herring
  2018-11-16 22:53 ` Rob Herring
  1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2018-11-16 18:38 UTC (permalink / raw)
  To: Stefan Popa
  Cc: robh+dt, mark.rutland, knaack.h, lars, pmeerw, Michael.Hennerich,
	gregkh, linux-iio, devicetree, linux-kernel

On Tue, 13 Nov 2018 13:21:01 +0200
Stefan Popa <stefan.popa@analog.com> wrote:

> There are several ADC drivers that depend on the same device tree
> bindings. Rather than continue to duplicate the properties, this patch
> adds a common adc binding document that can be referenced. For beginning,
> only two properties are documented.
> 
> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Looks very sensible to me, but as we are looking at a some generalization
here, I'd like an Ack from Rob if possible (as he suggested it I think :)

Thanks,

Jonathan

> ---
> Changes in v2, v3:
> 	- N/A.
> Changes in v4:
> 	- Added this commit.
> Changes in v5:
> 	- Nothing changed.
> 
>  Documentation/devicetree/bindings/iio/adc/adc.txt | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adc.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.txt b/Documentation/devicetree/bindings/iio/adc/adc.txt
> new file mode 100644
> index 0000000..5bbaa33
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adc.txt
> @@ -0,0 +1,23 @@
> +Common ADCs properties
> +
> +Optional properties for child nodes:
> +- bipolar : Boolean, if set the channel is used in bipolar mode.
> +- diff-channels : Differential channels muxed for this ADC. The first value
> +		specifies the positive input pin, the second value the negative
> +		input pin.
> +
> +Example:
> +	adc@0 {
> +		compatible = "some,adc";
> +		...
> +		channel@0 {
> +			bipolar;
> +			diff-channels = <0 1>;
> +			...
> +		};
> +
> +		channel@1 {
> +			diff-channels = <2 3>;
> +			...
> +		};
> +	};


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

* Re: [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file
  2018-11-16 18:38 ` Jonathan Cameron
@ 2018-11-16 22:53   ` Rob Herring
  2018-11-17 16:32     ` Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2018-11-16 22:53 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Stefan Popa, mark.rutland, knaack.h, lars, pmeerw,
	Michael.Hennerich, gregkh, linux-iio, devicetree, linux-kernel

On Fri, Nov 16, 2018 at 06:38:38PM +0000, Jonathan Cameron wrote:
> On Tue, 13 Nov 2018 13:21:01 +0200
> Stefan Popa <stefan.popa@analog.com> wrote:
> 
> > There are several ADC drivers that depend on the same device tree
> > bindings. Rather than continue to duplicate the properties, this patch
> > adds a common adc binding document that can be referenced. For beginning,
> > only two properties are documented.
> > 
> > Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> Looks very sensible to me, but as we are looking at a some generalization
> here, I'd like an Ack from Rob if possible (as he suggested it I think :)

Looks fine to me, but I don't have any clue if this will be flexible 
enough for various h/w.

Rob


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

* Re: [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file
  2018-11-13 11:21 [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file Stefan Popa
  2018-11-16 18:38 ` Jonathan Cameron
@ 2018-11-16 22:53 ` Rob Herring
  2018-11-17 16:39   ` Jonathan Cameron
  1 sibling, 1 reply; 6+ messages in thread
From: Rob Herring @ 2018-11-16 22:53 UTC (permalink / raw)
  To: Stefan Popa
  Cc: jic23, robh+dt, mark.rutland, knaack.h, lars, pmeerw,
	Michael.Hennerich, gregkh, linux-iio, devicetree, linux-kernel,
	stefan.popa

On Tue, 13 Nov 2018 13:21:01 +0200, Stefan Popa wrote:
> There are several ADC drivers that depend on the same device tree
> bindings. Rather than continue to duplicate the properties, this patch
> adds a common adc binding document that can be referenced. For beginning,
> only two properties are documented.
> 
> Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> ---
> Changes in v2, v3:
> 	- N/A.
> Changes in v4:
> 	- Added this commit.
> Changes in v5:
> 	- Nothing changed.
> 
>  Documentation/devicetree/bindings/iio/adc/adc.txt | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adc.txt
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file
  2018-11-16 22:53   ` Rob Herring
@ 2018-11-17 16:32     ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2018-11-17 16:32 UTC (permalink / raw)
  To: Rob Herring
  Cc: Stefan Popa, mark.rutland, knaack.h, lars, pmeerw,
	Michael.Hennerich, gregkh, linux-iio, devicetree, linux-kernel

On Fri, 16 Nov 2018 16:53:02 -0600
Rob Herring <robh@kernel.org> wrote:

> On Fri, Nov 16, 2018 at 06:38:38PM +0000, Jonathan Cameron wrote:
> > On Tue, 13 Nov 2018 13:21:01 +0200
> > Stefan Popa <stefan.popa@analog.com> wrote:
> >   
> > > There are several ADC drivers that depend on the same device tree
> > > bindings. Rather than continue to duplicate the properties, this patch
> > > adds a common adc binding document that can be referenced. For beginning,
> > > only two properties are documented.
> > > 
> > > Signed-off-by: Stefan Popa <stefan.popa@analog.com>  
> > Looks very sensible to me, but as we are looking at a some generalization
> > here, I'd like an Ack from Rob if possible (as he suggested it I think :)  
> 
> Looks fine to me, but I don't have any clue if this will be flexible 
> enough for various h/w.
I think we'll need more to cover all cases, but hopefully things that
make sense to be optional in general.  Rather hard to predict.  This is
the obvious stuff so far.

This is better than the current mess of different options!

Jonathan

> 
> Rob
> 


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

* Re: [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file
  2018-11-16 22:53 ` Rob Herring
@ 2018-11-17 16:39   ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2018-11-17 16:39 UTC (permalink / raw)
  To: Rob Herring
  Cc: Stefan Popa, robh+dt, mark.rutland, knaack.h, lars, pmeerw,
	Michael.Hennerich, gregkh, linux-iio, devicetree, linux-kernel

On Fri, 16 Nov 2018 16:53:19 -0600
Rob Herring <robh@kernel.org> wrote:

> On Tue, 13 Nov 2018 13:21:01 +0200, Stefan Popa wrote:
> > There are several ADC drivers that depend on the same device tree
> > bindings. Rather than continue to duplicate the properties, this patch
> > adds a common adc binding document that can be referenced. For beginning,
> > only two properties are documented.
> > 
> > Signed-off-by: Stefan Popa <stefan.popa@analog.com>
> > ---
> > Changes in v2, v3:
> > 	- N/A.
> > Changes in v4:
> > 	- Added this commit.
> > Changes in v5:
> > 	- Nothing changed.
> > 
> >  Documentation/devicetree/bindings/iio/adc/adc.txt | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/iio/adc/adc.txt
> >   
> 
> Reviewed-by: Rob Herring <robh@kernel.org>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

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

end of thread, other threads:[~2018-11-17 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 11:21 [PATCH v5 2/4] dt-bindings: iio: adc: Add common ADCs properties to a separate file Stefan Popa
2018-11-16 18:38 ` Jonathan Cameron
2018-11-16 22:53   ` Rob Herring
2018-11-17 16:32     ` Jonathan Cameron
2018-11-16 22:53 ` Rob Herring
2018-11-17 16:39   ` Jonathan Cameron

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).