Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Marcelo Schmitt <marcelo.schmitt@analog.com>
To: <lars@metafoo.de>, <Michael.Hennerich@analog.com>,
	<jic23@kernel.org>, <robh+dt@kernel.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
	<marcelo.schmitt1@gmail.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 0/2] Add support for AD4000 series
Date: Fri, 22 Mar 2024 19:04:20 -0300	[thread overview]
Message-ID: <cover.1711131830.git.marcelo.schmitt@analog.com> (raw)

This series adds support for high-speed, high-precision AD4000 series of SAR ADCs.

Most uncommon things about this set are:
1) These devices have the same SPI (Strange Peripheral Interface) as AD7944
devices, which has been documented in ad7944.rst [1].
The device tree description for SPI connections and mode can be the same as of
ad7944 adi,spi-mode [2].
Because ad4000 driver does not currently support daisy-chain mode, I simplified
things a little bit. If having a more complete doc is preferred, I'm fine
changing to that.

[1]: https://lore.kernel.org/linux-iio/20240313-mainline-ad7944-doc-v1-2-7860416726e4@baylibre.com/
[2]: https://lore.kernel.org/linux-iio/20240304-ad7944-mainline-v5-1-f0a38cea8901@baylibre.com/

2) Differently from AD7944, AD4000 devices have a configuration register to
toggle some features. For instance, turbo mode is set through configuration
register rather than an external pin. This simplifies hardware connections,
but then requires software interface. So, additional ABI being proposed 
in sysfs-bus-iio-adc-ad4000. The one I'm most in doubt about is 
span_compression_en which affects the in_voltageY_scale attribute.
That might be instead supported by providing _scale_available and allowing write
to _scale. Anyway, let me know how bad those look like :)

Thanks,
Marcelo

Marcelo Schmitt (2):
  dt-bindings: iio: adc: Add AD4000
  iio: adc: Add support for AD4000

 .../ABI/testing/sysfs-bus-iio-adc-ad4000      |  36 +
 .../bindings/iio/adc/adi,ad4000.yaml          | 151 ++++
 MAINTAINERS                                   |   9 +
 drivers/iio/adc/Kconfig                       |  12 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/ad4000.c                      | 666 ++++++++++++++++++
 6 files changed, 875 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-ad4000
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4000.yaml
 create mode 100644 drivers/iio/adc/ad4000.c

-- 
2.43.0


             reply	other threads:[~2024-03-22 22:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 22:04 Marcelo Schmitt [this message]
2024-03-22 22:05 ` [PATCH 1/2] dt-bindings: iio: adc: Add AD4000 Marcelo Schmitt
2024-03-22 23:28   ` Rob Herring
2024-03-23  3:29     ` Marcelo Schmitt
2024-03-23 10:58       ` Krzysztof Kozlowski
2024-03-23 18:44   ` Jonathan Cameron
2024-03-23 20:18     ` David Lechner
2024-03-23 20:38       ` David Lechner
2024-03-23 21:35         ` Marcelo Schmitt
2024-03-22 22:05 ` [PATCH 2/2] iio: adc: Add support for AD4000 Marcelo Schmitt
2024-03-23 19:12   ` Jonathan Cameron
2024-03-23 21:53   ` David Lechner
2024-03-24 12:45     ` Jonathan Cameron
2024-03-25 13:35     ` David Lechner

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=cover.1711131830.git.marcelo.schmitt@analog.com \
    --to=marcelo.schmitt@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).