* [PATCH v3 2/2] dt-bindings: iio: Add bindings for TI TLA202x ADCs
[not found] <1553608583-29006-1-git-send-email-ibtsam.haq.0x01@gmail.com>
@ 2019-03-26 13:56 ` Ibtsam Ul-Haq
2019-03-28 18:38 ` Rob Herring
0 siblings, 1 reply; 3+ messages in thread
From: Ibtsam Ul-Haq @ 2019-03-26 13:56 UTC (permalink / raw)
To: jic23
Cc: Ibtsam Ul-Haq, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Rob Herring, Mark Rutland, linux-iio,
devicetree, linux-kernel
This adds devicetree bindings for TI TLA202x ADCs.
Signed-off-by: Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com>
---
.../devicetree/bindings/iio/adc/ti-tla2024.txt | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
diff --git a/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt b/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
new file mode 100644
index 0000000..a4934df
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
@@ -0,0 +1,45 @@
+Texas Instruments' TLA2021/TLA2022/TLA2024 12-bit ADC driver
+
+Required properties:
+
+- compatible: should be one of:
+ "ti,tla2024"
+ "ti,tla2022"
+ "ti,tla2021"
+
+- reg: should contain the I2C Address of the device
+
+Required subnodes:
+
+The ADC channels are configured as subnodes of the ADC.
+The channels can be single-ended or differential, the input pins are
+also set in the subnode.
+
+Possible channels in TLA2024:
+ single: <0>, <1>, <2>, <3>
+ differential: <0 1>, <0 3>, <1 3>, <2 3>
+
+In TLA2021/TLA2022 only the differential channel <0 1> is allowed.
+
+Example:
+
+tla2024_0: adc0@49 {
+ compatible = "ti,tla2024";
+ reg = <0x49>;
+
+ v0@0 {
+ single-channel = <0>;
+ };
+
+ v1@1 {
+ single-channel = <1>;
+ };
+
+ v23@2 {
+ diff-channels = <2 3>;
+ };
+
+ v01@3 {
+ diff-channels = <0 1>;
+ };
+};
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3 2/2] dt-bindings: iio: Add bindings for TI TLA202x ADCs
2019-03-26 13:56 ` [PATCH v3 2/2] dt-bindings: iio: Add bindings for TI TLA202x ADCs Ibtsam Ul-Haq
@ 2019-03-28 18:38 ` Rob Herring
2019-03-30 15:58 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2019-03-28 18:38 UTC (permalink / raw)
To: Ibtsam Ul-Haq
Cc: jic23, Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
Mark Rutland, linux-iio, devicetree, linux-kernel
On Tue, Mar 26, 2019 at 02:56:20PM +0100, Ibtsam Ul-Haq wrote:
> This adds devicetree bindings for TI TLA202x ADCs.
>
> Signed-off-by: Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com>
> ---
> .../devicetree/bindings/iio/adc/ti-tla2024.txt | 45 ++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt b/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
> new file mode 100644
> index 0000000..a4934df
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
> @@ -0,0 +1,45 @@
> +Texas Instruments' TLA2021/TLA2022/TLA2024 12-bit ADC driver
> +
> +Required properties:
> +
> +- compatible: should be one of:
> + "ti,tla2024"
> + "ti,tla2022"
> + "ti,tla2021"
> +
> +- reg: should contain the I2C Address of the device
> +
> +Required subnodes:
> +
> +The ADC channels are configured as subnodes of the ADC.
> +The channels can be single-ended or differential, the input pins are
> +also set in the subnode.
> +
> +Possible channels in TLA2024:
> + single: <0>, <1>, <2>, <3>
> + differential: <0 1>, <0 3>, <1 3>, <2 3>
> +
> +In TLA2021/TLA2022 only the differential channel <0 1> is allowed.
> +
> +Example:
> +
> +tla2024_0: adc0@49 {
adc@49
> + compatible = "ti,tla2024";
> + reg = <0x49>;
> +
> + v0@0 {
Unit-address without 'reg' is not valid.
> + single-channel = <0>;
Look at the common adc binding or adi,ad7124.txt for how to do
multi-channel with differential channels.
> + };
> +
> + v1@1 {
> + single-channel = <1>;
> + };
> +
> + v23@2 {
> + diff-channels = <2 3>;
> + };
> +
> + v01@3 {
> + diff-channels = <0 1>;
> + };
> +};
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3 2/2] dt-bindings: iio: Add bindings for TI TLA202x ADCs
2019-03-28 18:38 ` Rob Herring
@ 2019-03-30 15:58 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2019-03-30 15:58 UTC (permalink / raw)
To: Rob Herring
Cc: Ibtsam Ul-Haq, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Mark Rutland, linux-iio, devicetree,
linux-kernel, Stefan Popa
+CC Stefan for a possible issue in ad7124
On Thu, 28 Mar 2019 13:38:42 -0500
Rob Herring <robh@kernel.org> wrote:
> On Tue, Mar 26, 2019 at 02:56:20PM +0100, Ibtsam Ul-Haq wrote:
> > This adds devicetree bindings for TI TLA202x ADCs.
> >
> > Signed-off-by: Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com>
> > ---
> > .../devicetree/bindings/iio/adc/ti-tla2024.txt | 45 ++++++++++++++++++++++
> > 1 file changed, 45 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt b/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
> > new file mode 100644
> > index 0000000..a4934df
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti-tla2024.txt
> > @@ -0,0 +1,45 @@
> > +Texas Instruments' TLA2021/TLA2022/TLA2024 12-bit ADC driver
> > +
> > +Required properties:
> > +
> > +- compatible: should be one of:
> > + "ti,tla2024"
> > + "ti,tla2022"
> > + "ti,tla2021"
> > +
> > +- reg: should contain the I2C Address of the device
> > +
> > +Required subnodes:
> > +
> > +The ADC channels are configured as subnodes of the ADC.
> > +The channels can be single-ended or differential, the input pins are
> > +also set in the subnode.
> > +
> > +Possible channels in TLA2024:
> > + single: <0>, <1>, <2>, <3>
> > + differential: <0 1>, <0 3>, <1 3>, <2 3>
> > +
> > +In TLA2021/TLA2022 only the differential channel <0 1> is allowed.
> > +
> > +Example:
> > +
> > +tla2024_0: adc0@49 {
>
> adc@49
>
> > + compatible = "ti,tla2024";
> > + reg = <0x49>;
> > +
> > + v0@0 {
>
> Unit-address without 'reg' is not valid.
>
> > + single-channel = <0>;
>
> Look at the common adc binding or adi,ad7124.txt for how to do
> multi-channel with differential channels.
Hi Rob.
Only difference from the standard doc
Documentation/devicetree/bindings/adc/adc.txt
which should be fixed is that channels are
channel@0, channel@1 etc
Non differential channels aren't in that doc yet but what we have
here works for me (other than the naming).
Note however, we didn't require reg in that binding so probably
have something to fix there. The adi driver you reference does
have reg in the bindings, though so we should probably just add
that to the generic doc.
One side note though for Stefan, What happens if someone provides
a non contiguous set of reg values or one greater than 3 for the ad7124?
e should probably harden the driver against that (or am I missing something).
Jonathan
>
> > + };
> > +
> > + v1@1 {
> > + single-channel = <1>;
> > + };
> > +
> > + v23@2 {
> > + diff-channels = <2 3>;
> > + };
> > +
> > + v01@3 {
> > + diff-channels = <0 1>;
> > + };
> > +};
> > --
> > 2.7.4
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-30 15:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1553608583-29006-1-git-send-email-ibtsam.haq.0x01@gmail.com>
2019-03-26 13:56 ` [PATCH v3 2/2] dt-bindings: iio: Add bindings for TI TLA202x ADCs Ibtsam Ul-Haq
2019-03-28 18:38 ` Rob Herring
2019-03-30 15:58 ` 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).