[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMknhBEwS2O3gWnJcc2RDXbeiUZ54pPm8PskGTTKL9xKYBOZ4A@mail.gmail.com>
Date: Sat, 13 Apr 2024 13:05:01 -0500
From: David Lechner <dlechner@...libre.com>
To: Alisa-Dariana Roman <alisadariana@...il.com>
Cc: michael.hennerich@...log.com, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
alexandru.tachici@...log.com, lars@...afoo.de, jic23@...nel.org,
robh@...nel.org, krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
lgirdwood@...il.com, broonie@...nel.org, andy@...nel.org, nuno.sa@...log.com,
marcelo.schmitt@...log.com, bigunclemax@...il.com, okan.sahin@...log.com,
fr0st61te@...il.com, alisa.roman@...log.com, marcus.folkesson@...il.com,
schnelle@...ux.ibm.com, liambeguin@...il.com
Subject: Re: [PATCH v5 2/5] dt-bindings: iio: adc: ad7192: Add aincom supply
On Sat, Apr 13, 2024 at 10:12 AM Alisa-Dariana Roman
<alisadariana@...il.com> wrote:
>
> AINCOM should actually be a supply. If present and it has a non-zero
> voltage, the pseudo-differential channels are configured as single-ended
> with an offset. Otherwise, they are configured as differential channels
> between AINx and AINCOM pins.
>
> Signed-off-by: Alisa-Dariana Roman <alisa.roman@...log.com>
> ---
> .../devicetree/bindings/iio/adc/adi,ad7192.yaml | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> index 16def2985ab4..ba506af3b73e 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
> @@ -41,6 +41,14 @@ properties:
> interrupts:
> maxItems: 1
>
> + aincom-supply:
> + description: |
> + Optional AINCOM voltage supply. If present and it has a non-zero voltage,
> + the pseudo-differential channels are configured as single-ended channels
> + with the AINCOM voltage as offset. Otherwise, the pseudo-differential
> + channels are configured as differential channels: voltageX-voltage0, with
> + AINCOM as the negative input.
This description doesn't sound quite right to me. The datasheet has no
mention of single-ended inputs. And how each AINx input is used is
independent of whether this property is present or not. And
voltageX-voltage0 is a driver implementation detail that doesn't
really belong in the bindings.
Also, just FYI, in a similar case, Jonathan recently mentioned that he
would prefer that these sorts of supplies would be required rather
than optional [1]. But in this case, I think it needs to be optional
for backwards compatibility since we are modifying existing DT
bindings. But the point still stands that this property being present
or not doesn't mean anything special (other than we might assume the
AINCOM pin is connected to GND if the property is omitted).
[1]: https://lore.kernel.org/linux-iio/20240413181025.39d1a62e@jic23-huawei/
In any case, a better description would be one more like what the
datasheet says for the AINCOM pin:
"Analog inputs AIN1 to AIN4 are referenced to this input when
configured for pseudodifferential operation."
> +
> dvdd-supply:
> description: DVdd voltage supply
>
> @@ -117,6 +125,7 @@ examples:
> clock-names = "mclk";
> interrupts = <25 0x2>;
> interrupt-parent = <&gpio>;
> + aincom-supply = <&aincom>;
> dvdd-supply = <&dvdd>;
> avdd-supply = <&avdd>;
> vref-supply = <&vref>;
> --
> 2.34.1
>
Powered by blists - more mailing lists