diff mbox series

[v2,6/8] dt-bindings: iio: adc: document diff-channels corner case for some ADCs

Message ID 20240902103638.686039-7-aardelean@baylibre.com (mailing list archive)
State Changes Requested
Headers show
Series iio: adc: ad7606: add support for AD7606C-{16,18} parts | expand

Commit Message

Alexandru Ardelean Sept. 2, 2024, 10:36 a.m. UTC
Some ADCs have channels with negative and positive inputs, which can be
used to measure differential voltage levels. These inputs/pins are
dedicated (to the given channel) and cannot be muxed as with other ADCs.

For those types of setups, the 'diff-channels' property can be specified to
be used with the channel number (or reg property) for both negative and
positive inputs/pins.

Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
---
 Documentation/devicetree/bindings/iio/adc/adc.yaml | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Krzysztof Kozlowski Sept. 2, 2024, 11:54 a.m. UTC | #1
On Mon, Sep 02, 2024 at 01:36:29PM +0300, Alexandru Ardelean wrote:
> Some ADCs have channels with negative and positive inputs, which can be
> used to measure differential voltage levels. These inputs/pins are
> dedicated (to the given channel) and cannot be muxed as with other ADCs.
> 
> For those types of setups, the 'diff-channels' property can be specified to
> be used with the channel number (or reg property) for both negative and
> positive inputs/pins.
> 
> Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
> ---
>  Documentation/devicetree/bindings/iio/adc/adc.yaml | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> index 8e7835cf36fd..9b7a8e149639 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> @@ -37,6 +37,10 @@ properties:
>        to both the positive and negative inputs of a differential ADC.
>        The first value specifies the positive input pin, the second
>        specifies the negative input pin.
> +      There are also some ADCs, where the differential channel has dedicated
> +      positive and negative inputs which can be used to measure differential
> +      voltage levels. For those setups, this property can be configured with
> +      the the 'reg' property (i.e. diff-channels = <reg reg>).

Please run scripts/checkpatch.pl and fix reported warnings. Then please
run  and (probably) fix more warnings.
Some warnings can be ignored, especially from --strict run, but the code
here looks like it needs a fix. Feel free to get in touch if the warning
is not clear.

Best regards,
Krzysztof
Alexandru Ardelean Sept. 2, 2024, 6:28 p.m. UTC | #2
On Mon, Sep 2, 2024 at 2:54 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Mon, Sep 02, 2024 at 01:36:29PM +0300, Alexandru Ardelean wrote:
> > Some ADCs have channels with negative and positive inputs, which can be
> > used to measure differential voltage levels. These inputs/pins are
> > dedicated (to the given channel) and cannot be muxed as with other ADCs.
> >
> > For those types of setups, the 'diff-channels' property can be specified to
> > be used with the channel number (or reg property) for both negative and
> > positive inputs/pins.
> >
> > Signed-off-by: Alexandru Ardelean <aardelean@baylibre.com>
> > ---
> >  Documentation/devicetree/bindings/iio/adc/adc.yaml | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> > index 8e7835cf36fd..9b7a8e149639 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
> > @@ -37,6 +37,10 @@ properties:
> >        to both the positive and negative inputs of a differential ADC.
> >        The first value specifies the positive input pin, the second
> >        specifies the negative input pin.
> > +      There are also some ADCs, where the differential channel has dedicated
> > +      positive and negative inputs which can be used to measure differential
> > +      voltage levels. For those setups, this property can be configured with
> > +      the the 'reg' property (i.e. diff-channels = <reg reg>).
>
> Please run scripts/checkpatch.pl and fix reported warnings. Then please
> run  and (probably) fix more warnings.
> Some warnings can be ignored, especially from --strict run, but the code
> here looks like it needs a fix. Feel free to get in touch if the warning
> is not clear.

Right.
Will fix.
Seems checkpatch.pl is able to catch my stutter.

>
> Best regards,
> Krzysztof
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
index 8e7835cf36fd..9b7a8e149639 100644
--- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
@@ -37,6 +37,10 @@  properties:
       to both the positive and negative inputs of a differential ADC.
       The first value specifies the positive input pin, the second
       specifies the negative input pin.
+      There are also some ADCs, where the differential channel has dedicated
+      positive and negative inputs which can be used to measure differential
+      voltage levels. For those setups, this property can be configured with
+      the the 'reg' property (i.e. diff-channels = <reg reg>).
 
   single-channel:
     $ref: /schemas/types.yaml#/definitions/uint32