public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: linux-iio@vger.kernel.org,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: ad7944: add driver for AD7944/AD7985/AD7986
Date: Mon, 19 Feb 2024 19:46:50 +0000	[thread overview]
Message-ID: <20240219194650.3e14c877@jic23-huawei> (raw)
In-Reply-To: <CAMknhBH2Pqa9xpPxnTCxJegVTbOG-QDeJA4YrQUPfj+hfSs73A@mail.gmail.com>

On Mon, 19 Feb 2024 13:13:35 -0600
David Lechner <dlechner@baylibre.com> wrote:

> On Fri, Feb 16, 2024 at 1:47 PM David Lechner <dlechner@baylibre.com> wrote:
> 
> ...
> 
> > +
> > +#define AD7944_DEFINE_CHIP_INFO(_name, _t, _bits, _sign)               \
> > +static const struct ad7944_chip_info _name##_chip_info = {             \
> > +       .name = #_name,                                                 \
> > +       .t = &_t##_timing_spec,                                         \
> > +       .channels = {                                                   \
> > +               {                                                       \
> > +                       .type = IIO_VOLTAGE,                            \
> > +                       .indexed = 1,                                   \
> > +                       .differential = 1,                              \
> > +                       .channel = 0,                                   \
> > +                       .channel2 = 1,                                  \
> > +                       .scan_index = 0,                                \
> > +                       .scan_type.sign = _sign,                        \
> > +                       .scan_type.realbits = _bits,                    \
> > +                       .scan_type.storagebits = _bits > 16 ? 32 : 16,  \
> > +                       .scan_type.endianness = IIO_CPU,                \
> > +                       .info_mask_separate = BIT(IIO_CHAN_INFO_RAW)    \
> > +                                       | BIT(IIO_CHAN_INFO_SCALE),     \
> > +               },                                                      \
> > +               IIO_CHAN_SOFT_TIMESTAMP(1),                             \
> > +       },                                                              \
> > +}
> > +
> > +AD7944_DEFINE_CHIP_INFO(ad7944, ad7944, 14, 'u');
> > +AD7944_DEFINE_CHIP_INFO(ad7985, ad7944, 16, 'u');
> > +AD7944_DEFINE_CHIP_INFO(ad7986, ad7986, 18, 's');  
> 
> Now that I have been enlightened [1] about pseudo-differntial inputs,
> I'm thinking that AD7944 and AD7985 should not have the .differential
> = 1 flag set since they are pseudo-differential inputs with a ground
> sense on the negative input (and no extra supply needed since it is
> always ground). Does that sound right?

yes

> 
> AD7986 is true differential though, so should be correct already.
> 
> [1]: https://lore.kernel.org/linux-iio/CAMknhBF5mAsN1c-194Qwa5oKmqKzef2khXnqA1cSdKpWHKWp0w@mail.gmail.com/


      reply	other threads:[~2024-02-19 19:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 19:46 [PATCH v2 0/2] iio: adc: ad7944: new driver David Lechner
2024-02-16 19:46 ` [PATCH v2 1/2] dt-bindings: iio: adc: add ad7944 ADCs David Lechner
2024-02-20 19:47   ` Conor Dooley
2024-02-21 15:22   ` Rob Herring
2024-02-21 15:44     ` David Lechner
2024-02-22 15:34       ` Rob Herring
2024-02-27 19:15         ` David Lechner
2024-02-16 19:46 ` [PATCH v2 2/2] iio: adc: ad7944: add driver for AD7944/AD7985/AD7986 David Lechner
2024-02-19 19:13   ` David Lechner
2024-02-19 19:46     ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240219194650.3e14c877@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox