devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
@ 2024-11-13 14:41 Sperling, Tobias
  2024-11-15 17:36 ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Sperling, Tobias @ 2024-11-13 14:41 UTC (permalink / raw)
  To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
  Cc: jic23@kernel.org, lars@metafoo.de, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, Sperling, Tobias

From 6a06973e1023ca6a128c8d426b4c87887117c084 Mon Sep 17 00:00:00 2001
From: Tobias Sperling <tobias.sperling@softing.com>
Date: Wed, 13 Nov 2024 14:52:49 +0100
Subject: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138

Add documentation for the driver of ADS7128 and ADS7138 12-bit, 8-channel
analog-to-digital converters. These ADCs have a wide operating range and
a wide feature set. Communication is based on the I2C interface.

Signed-off-by: Tobias Sperling <tobias.sperling@softing.com>
---
 .../bindings/iio/adc/ti,ads7138.yaml          | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
new file mode 100644
index 000000000000..c70ad5747828
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads7138.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ADS7128/ADS7138 Analog to Digital Converter (ADC)
+
+maintainers:
+  - Tobias Sperling <tobias.sperling@softing.com>
+
+description: |
+  The ADS7128 is 12-Bit, 8-Channel Sampling Analog to Digital Converter (ADC)
+  with an I2C interface.
+
+  Datasheets:
+    https://www.ti.com/product/ADS7128
+    https://www.ti.com/product/ADS7138
+
+properties:
+  compatible:
+    enum:
+      - ti,ads7128
+      - ti,ads7138
+
+  reg:
+    maxItems: 1
+
+  avdd-supply:
+    description:
+      The regulator used as analog supply voltage as well as reference voltage.
+
+  interrupts:
+    description:
+      Interrupt on ALERT pin, triggers on low level.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - avdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@10 {
+            compatible = "ti,ads7138";
+            reg = <0x10>;
+            avdd-supply = <&reg_stb_3v3>;
+            interrupt-parent = <&gpio2>;
+            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+        };
+    };
+...
-- 
2.34.1


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

* Re: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
  2024-11-13 14:41 [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138 Sperling, Tobias
@ 2024-11-15 17:36 ` Rob Herring
  2024-11-18 13:43   ` Sperling, Tobias
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2024-11-15 17:36 UTC (permalink / raw)
  To: Sperling, Tobias
  Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, jic23@kernel.org, lars@metafoo.de,
	krzk+dt@kernel.org, conor+dt@kernel.org

On Wed, Nov 13, 2024 at 02:41:08PM +0000, Sperling, Tobias wrote:
> >From 6a06973e1023ca6a128c8d426b4c87887117c084 Mon Sep 17 00:00:00 2001
> From: Tobias Sperling <tobias.sperling@softing.com>
> Date: Wed, 13 Nov 2024 14:52:49 +0100
> Subject: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138

Your patch is corrupted.

> 
> Add documentation for the driver of ADS7128 and ADS7138 12-bit, 8-channel
> analog-to-digital converters. These ADCs have a wide operating range and
> a wide feature set. Communication is based on the I2C interface.
> 
> Signed-off-by: Tobias Sperling <tobias.sperling@softing.com>
> ---
>  .../bindings/iio/adc/ti,ads7138.yaml          | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> new file mode 100644
> index 000000000000..c70ad5747828
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/ti,ads7138.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments ADS7128/ADS7138 Analog to Digital Converter (ADC)
> +
> +maintainers:
> +  - Tobias Sperling <tobias.sperling@softing.com>
> +
> +description: |
> +  The ADS7128 is 12-Bit, 8-Channel Sampling Analog to Digital Converter (ADC)
> +  with an I2C interface.
> +
> +  Datasheets:
> +    https://www.ti.com/product/ADS7128
> +    https://www.ti.com/product/ADS7138
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,ads7128
> +      - ti,ads7138

What's the difference between the 2?

> +
> +  reg:
> +    maxItems: 1
> +
> +  avdd-supply:
> +    description:
> +      The regulator used as analog supply voltage as well as reference voltage.
> +
> +  interrupts:
> +    description:
> +      Interrupt on ALERT pin, triggers on low level.
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - avdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@10 {
> +            compatible = "ti,ads7138";
> +            reg = <0x10>;
> +            avdd-supply = <&reg_stb_3v3>;
> +            interrupt-parent = <&gpio2>;
> +            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
> +        };
> +    };
> +...
> -- 
> 2.34.1
> 

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

* Re: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
  2024-11-15 17:36 ` Rob Herring
@ 2024-11-18 13:43   ` Sperling, Tobias
  2024-11-19 14:32     ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Sperling, Tobias @ 2024-11-18 13:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, jic23@kernel.org, lars@metafoo.de,
	krzk+dt@kernel.org, conor+dt@kernel.org

> On Wed, Nov 13, 2024 at 02:41:08PM +0000, Sperling, Tobias wrote:
> > >From 6a06973e1023ca6a128c8d426b4c87887117c084 Mon Sep 17 00:00:00
> 2001
> > From: Tobias Sperling <tobias.sperling@softing.com>
> > Date: Wed, 13 Nov 2024 14:52:49 +0100
> > Subject: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
>
> Your patch is corrupted.

Yeah, might look a little different from what you are usually used to see, as
I had to copy the patch manually to the mails body. SMTP doesn't work
for us unfortunately. Anyway, the patch applies just fine with "git apply",
doesn't it for you?

> > Add documentation for the driver of ADS7128 and ADS7138 12-bit, 8-channel
> > analog-to-digital converters. These ADCs have a wide operating range and
> > a wide feature set. Communication is based on the I2C interface.
> >
> > Signed-off-by: Tobias Sperling <tobias.sperling@softing.com>
> > ---
> >  .../bindings/iio/adc/ti,ads7138.yaml          | 60 +++++++++++++++++++
> >  1 file changed, 60 insertions(+)
> >  create mode 100644
> Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> > new file mode 100644
> > index 000000000000..c70ad5747828
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> > @@ -0,0 +1,60 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id:
> http://devicetree/.
> org%2Fschemas%2Fiio%2Fadc%2Fti%2Cads7138.yaml%23&data=05%7C02%7C%
> 7Cf943e3cd23dd4c28422608dd059c1cd9%7Cfe3606fad3974238999768dcd7851f
> 64%7C1%7C0%7C638672890241515102%7CUnknown%7CTWFpbGZsb3d8eyJFb
> XB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpb
> CIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=KFK6uoMuDUTlwSRv5jUd%2FQ
> mBqKRHIDCq%2Bb1nWhOkZTk%3D&reserved=0
> > +$schema:
> http://devicetree/.
> org%2Fmeta-
> schemas%2Fcore.yaml%23&data=05%7C02%7C%7Cf943e3cd23dd4c28422608d
> d059c1cd9%7Cfe3606fad3974238999768dcd7851f64%7C1%7C0%7C638672890
> 241534499%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%
> 7C%7C%7C&sdata=2Dj6PlC%2BzKkjcxWosWYMd9Wnh71dKJZfXx5af85vQf8%3D
> &reserved=0
> > +
> > +title: Texas Instruments ADS7128/ADS7138 Analog to Digital Converter (ADC)
> > +
> > +maintainers:
> > +  - Tobias Sperling <tobias.sperling@softing.com>
> > +
> > +description: |
> > +  The ADS7128 is 12-Bit, 8-Channel Sampling Analog to Digital Converter (ADC)
> > +  with an I2C interface.
> > +
> > +  Datasheets:
> > +
> https://www.ti.co/
> m%2Fproduct%2FADS7128&data=05%7C02%7C%7Cf943e3cd23dd4c28422608d
> d059c1cd9%7Cfe3606fad3974238999768dcd7851f64%7C1%7C0%7C638672890
> 241551566%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%
> 7C%7C%7C&sdata=MtZjBaLGanD7%2BwQJZDc54CWVVkDbUV1jAv9PixBdOxk%3
> D&reserved=0
> > +
> https://www.ti.co/
> m%2Fproduct%2FADS7138&data=05%7C02%7C%7Cf943e3cd23dd4c28422608d
> d059c1cd9%7Cfe3606fad3974238999768dcd7851f64%7C1%7C0%7C638672890
> 241564942%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%
> 7C%7C%7C&sdata=DlLY9HTzdOyvooQA%2FCI%2BQJu0REGlwP2mpR%2Bp6M8C
> 5yk%3D&reserved=0
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,ads7128
> > +      - ti,ads7138
>
> What's the difference between the 2?

The 7128 has some more hardware features like a root-mean-square
module and a zero-crossing-detect module. Base functionality and
therefore, what's implemented in the driver yet, is the same, however.

> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  avdd-supply:
> > +    description:
> > +      The regulator used as analog supply voltage as well as reference voltage.
> > +
> > +  interrupts:
> > +    description:
> > +      Interrupt on ALERT pin, triggers on low level.
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +  - avdd-supply
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        adc@10 {
> > +            compatible = "ti,ads7138";
> > +            reg = <0x10>;
> > +            avdd-supply = <&reg_stb_3v3>;
> > +            interrupt-parent = <&gpio2>;
> > +            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
> > +        };
> > +    };
> > +...
> > --
> > 2.34.1
> >

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

* Re: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
  2024-11-18 13:43   ` Sperling, Tobias
@ 2024-11-19 14:32     ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2024-11-19 14:32 UTC (permalink / raw)
  To: Sperling, Tobias
  Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, jic23@kernel.org, lars@metafoo.de,
	krzk+dt@kernel.org, conor+dt@kernel.org

On Mon, Nov 18, 2024 at 01:43:02PM +0000, Sperling, Tobias wrote:
> > On Wed, Nov 13, 2024 at 02:41:08PM +0000, Sperling, Tobias wrote:
> > > >From 6a06973e1023ca6a128c8d426b4c87887117c084 Mon Sep 17 00:00:00
> > 2001
> > > From: Tobias Sperling <tobias.sperling@softing.com>
> > > Date: Wed, 13 Nov 2024 14:52:49 +0100
> > > Subject: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
> >
> > Your patch is corrupted.
> 
> Yeah, might look a little different from what you are usually used to see, as
> I had to copy the patch manually to the mails body. SMTP doesn't work
> for us unfortunately. Anyway, the patch applies just fine with "git apply",
> doesn't it for you?

git-apply doesn't apply the commit message. git-am is what you want. It 
tripped up my scripts, but that seems to because it has line-feed char 
in Message-ID. It did apply manually running b4.

There's a b4 relay you can use to send if you can't get SMTP to work. 
Messing with things manually is asking for trouble.

> > > Add documentation for the driver of ADS7128 and ADS7138 12-bit, 8-channel
> > > analog-to-digital converters. These ADCs have a wide operating range and
> > > a wide feature set. Communication is based on the I2C interface.
> > >
> > > Signed-off-by: Tobias Sperling <tobias.sperling@softing.com>
> > > ---
> > >  .../bindings/iio/adc/ti,ads7138.yaml          | 60 +++++++++++++++++++
> > >  1 file changed, 60 insertions(+)
> > >  create mode 100644
> > Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> > b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> > > new file mode 100644
> > > index 000000000000..c70ad5747828
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> > > @@ -0,0 +1,60 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id:
> > http://devicetree/.
> > org%2Fschemas%2Fiio%2Fadc%2Fti%2Cads7138.yaml%23&data=05%7C02%7C%
> > 7Cf943e3cd23dd4c28422608dd059c1cd9%7Cfe3606fad3974238999768dcd7851f
> > 64%7C1%7C0%7C638672890241515102%7CUnknown%7CTWFpbGZsb3d8eyJFb
> > XB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpb
> > CIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=KFK6uoMuDUTlwSRv5jUd%2FQ
> > mBqKRHIDCq%2Bb1nWhOkZTk%3D&reserved=0
> > > +$schema:
> > http://devicetree/.
> > org%2Fmeta-
> > schemas%2Fcore.yaml%23&data=05%7C02%7C%7Cf943e3cd23dd4c28422608d
> > d059c1cd9%7Cfe3606fad3974238999768dcd7851f64%7C1%7C0%7C638672890
> > 241534499%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> > IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%
> > 7C%7C%7C&sdata=2Dj6PlC%2BzKkjcxWosWYMd9Wnh71dKJZfXx5af85vQf8%3D
> > &reserved=0
> > > +
> > > +title: Texas Instruments ADS7128/ADS7138 Analog to Digital Converter (ADC)
> > > +
> > > +maintainers:
> > > +  - Tobias Sperling <tobias.sperling@softing.com>
> > > +
> > > +description: |
> > > +  The ADS7128 is 12-Bit, 8-Channel Sampling Analog to Digital Converter (ADC)
> > > +  with an I2C interface.
> > > +
> > > +  Datasheets:
> > > +
> > https://www.ti.co/
> > m%2Fproduct%2FADS7128&data=05%7C02%7C%7Cf943e3cd23dd4c28422608d
> > d059c1cd9%7Cfe3606fad3974238999768dcd7851f64%7C1%7C0%7C638672890
> > 241551566%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> > IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%
> > 7C%7C%7C&sdata=MtZjBaLGanD7%2BwQJZDc54CWVVkDbUV1jAv9PixBdOxk%3
> > D&reserved=0
> > > +
> > https://www.ti.co/
> > m%2Fproduct%2FADS7138&data=05%7C02%7C%7Cf943e3cd23dd4c28422608d
> > d059c1cd9%7Cfe3606fad3974238999768dcd7851f64%7C1%7C0%7C638672890
> > 241564942%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOi
> > IwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%
> > 7C%7C%7C&sdata=DlLY9HTzdOyvooQA%2FCI%2BQJu0REGlwP2mpR%2Bp6M8C
> > 5yk%3D&reserved=0
> > > +
> > > +properties:
> > > +  compatible:
> > > +    enum:
> > > +      - ti,ads7128
> > > +      - ti,ads7138
> >
> > What's the difference between the 2?
> 
> The 7128 has some more hardware features like a root-mean-square
> module and a zero-crossing-detect module. Base functionality and
> therefore, what's implemented in the driver yet, is the same, however.

Please put that in the description.

Rob

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

* [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
  2024-11-22 15:15 [PATCH 0/2] Support for TI ADS7128 and ADS7138 ADCs Tobias Sperling via B4 Relay
@ 2024-11-22 15:15 ` Tobias Sperling via B4 Relay
  2024-11-23 16:53   ` Jonathan Cameron
  2024-11-26  7:27   ` Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Tobias Sperling via B4 Relay @ 2024-11-22 15:15 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-iio, devicetree, linux-kernel, Tobias Sperling

From: Tobias Sperling <tobias.sperling@softing.com>

Add documentation for the driver of ADS7128 and ADS7138 12-bit, 8-channel
analog-to-digital converters. These ADCs have a wide operating range and
a wide feature set. Communication is based on the I2C interface.

Signed-off-by: Tobias Sperling <tobias.sperling@softing.com>
---
 .../devicetree/bindings/iio/adc/ti,ads7138.yaml    | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..367d3b27cec3bc5800aac42c8a07497da7de4c1b
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/ti,ads7138.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments ADS7128/ADS7138 analog-to-digital converter (ADC)
+
+maintainers:
+  - Tobias Sperling <tobias.sperling@softing.com>
+
+description: |
+  The ADS7128 and ADS7138 chips are 12-bit, 8 channel analog-to-digital
+  converters (ADC) with build-in digital window comparator (DWC), using the
+  I2C interface.
+  ADS7128 differs in the addition of further hardware features, like a
+  root-mean-square (RMS) and a zero-crossing-detect (ZCD) module, which are
+  not yet supported by the driver.
+
+  Datasheets:
+    https://www.ti.com/product/ADS7128
+    https://www.ti.com/product/ADS7138
+
+properties:
+  compatible:
+    enum:
+      - ti,ads7128
+      - ti,ads7138
+
+  reg:
+    maxItems: 1
+
+  avdd-supply:
+    description:
+      The regulator used as analog supply voltage as well as reference voltage.
+
+  interrupts:
+    description:
+      Interrupt on ALERT pin, triggers on low level.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - avdd-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        adc@10 {
+            compatible = "ti,ads7138";
+            reg = <0x10>;
+            avdd-supply = <&reg_stb_3v3>;
+            interrupt-parent = <&gpio2>;
+            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
+        };
+    };
+...

-- 
2.34.1



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

* Re: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
  2024-11-22 15:15 ` [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138 Tobias Sperling via B4 Relay
@ 2024-11-23 16:53   ` Jonathan Cameron
  2024-11-26  7:27   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2024-11-23 16:53 UTC (permalink / raw)
  To: Tobias Sperling via B4 Relay
  Cc: tobias.sperling, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree,
	linux-kernel

On Fri, 22 Nov 2024 16:15:36 +0100
Tobias Sperling via B4 Relay <devnull+tobias.sperling.softing.com@kernel.org> wrote:

> From: Tobias Sperling <tobias.sperling@softing.com>
> 
> Add documentation for the driver of ADS7128 and ADS7138 12-bit, 8-channel
> analog-to-digital converters. These ADCs have a wide operating range and
> a wide feature set. Communication is based on the I2C interface.
> 
> Signed-off-by: Tobias Sperling <tobias.sperling@softing.com>
Hi Tobias,

Welcome to IIO.
This should really have been a v2 to avoid confusion but good that b4-relay worked
for you.

Add a little on the differences you mention below to the patch description.

One comment inline.

Thanks,

Jonathan

> ---
>  .../devicetree/bindings/iio/adc/ti,ads7138.yaml    | 64 ++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..367d3b27cec3bc5800aac42c8a07497da7de4c1b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7138.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/ti,ads7138.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments ADS7128/ADS7138 analog-to-digital converter (ADC)
> +
> +maintainers:
> +  - Tobias Sperling <tobias.sperling@softing.com>
> +
> +description: |
> +  The ADS7128 and ADS7138 chips are 12-bit, 8 channel analog-to-digital
> +  converters (ADC) with build-in digital window comparator (DWC), using the
> +  I2C interface.
> +  ADS7128 differs in the addition of further hardware features, like a
> +  root-mean-square (RMS) and a zero-crossing-detect (ZCD) module, which are
> +  not yet supported by the driver.
Don't mention the driver in a dt-binding. It's all about the hardware
not so much what we support.
So say what features it has, but not the bit about support.

> +
> +  Datasheets:
> +    https://www.ti.com/product/ADS7128
> +    https://www.ti.com/product/ADS7138
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,ads7128
> +      - ti,ads7138
> +
> +  reg:
> +    maxItems: 1
> +
> +  avdd-supply:
> +    description:
> +      The regulator used as analog supply voltage as well as reference voltage.
> +
> +  interrupts:
> +    description:
> +      Interrupt on ALERT pin, triggers on low level.
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - avdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        adc@10 {
> +            compatible = "ti,ads7138";
> +            reg = <0x10>;
> +            avdd-supply = <&reg_stb_3v3>;
> +            interrupt-parent = <&gpio2>;
> +            interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
> +        };
> +    };
> +...
> 


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

* Re: [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138
  2024-11-22 15:15 ` [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138 Tobias Sperling via B4 Relay
  2024-11-23 16:53   ` Jonathan Cameron
@ 2024-11-26  7:27   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-11-26  7:27 UTC (permalink / raw)
  To: Tobias Sperling
  Cc: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-iio, devicetree,
	linux-kernel

On Fri, Nov 22, 2024 at 04:15:36PM +0100, Tobias Sperling wrote:
> +description: |
> +  The ADS7128 and ADS7138 chips are 12-bit, 8 channel analog-to-digital
> +  converters (ADC) with build-in digital window comparator (DWC), using the
> +  I2C interface.
> +  ADS7128 differs in the addition of further hardware features, like a
> +  root-mean-square (RMS) and a zero-crossing-detect (ZCD) module, which are
> +  not yet supported by the driver.

driver in which operating system? If FreeBSD supports them, but Linux
not, are you going to udpate this text?

Please drop all references to operating system and describe the
hardware.

With fixed description:

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

end of thread, other threads:[~2024-11-26  7:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-13 14:41 [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138 Sperling, Tobias
2024-11-15 17:36 ` Rob Herring
2024-11-18 13:43   ` Sperling, Tobias
2024-11-19 14:32     ` Rob Herring
  -- strict thread matches above, loose matches on Subject: below --
2024-11-22 15:15 [PATCH 0/2] Support for TI ADS7128 and ADS7138 ADCs Tobias Sperling via B4 Relay
2024-11-22 15:15 ` [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138 Tobias Sperling via B4 Relay
2024-11-23 16:53   ` Jonathan Cameron
2024-11-26  7:27   ` Krzysztof Kozlowski

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