linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Santos <Jonathan.Santos@analog.com>
To: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: Jonathan Santos <Jonathan.Santos@analog.com>, <lars@metafoo.de>,
	<Michael.Hennerich@analog.com>, <jic23@kernel.org>,
	<dlechner@baylibre.com>, <nuno.sa@analog.com>, <andy@kernel.org>,
	<robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
	<jonath4nns@gmail.com>
Subject: [PATCH v5 0/5] Add support for ADAQ776x-1 ADC Family
Date: Wed, 17 Dec 2025 02:52:12 -0300	[thread overview]
Message-ID: <cover.1765900411.git.Jonathan.Santos@analog.com> (raw)

This adds support for the ADAQ7767-1, ADAQ7768-1 and ADAQ7769-1 devices. 

The ADAQ7768-1 and ADAQ7769-1 integrate a programmable gain amplifier (PGA)
with 7 and 8 gain options, respectively. The ADAQ7767-1 and ADAQ7769-1 
also feature a 3-pin selectable Anti-aliasing filter (AAF) gain.

---
Changes in v5:
* Added PERCENT macro along with BASIS_POINTS in units.h.
* Added new patch to allow writing attributes without direct mode claim.
* Write scale attribute without direct mode claim to avoid deadlock
  when using GPIOs from the device's own controller.
* Link to v4: https://lore.kernel.org/linux-iio/cover.1764101647.git.Jonathan.Santos@analog.com/T/#t


Changes in v4:
* Removed u64_fract type patch, as it is not used. u32_fract is sufficient
  for the PGA gain calculations.
* Added new patch adding BASIS_POINTS macro to units.h.
* Included pga-gpios property for parts that support PGA gain.
  Before we were using the internal gpio controller to manage the PGA pins,
  but still exposing the controller for external use (causing possible conflicts).
* Addressed other review comments, see individual patches.
* Link to v3: https://lore.kernel.org/linux-iio/cover.1757001160.git.Jonathan.Santos@analog.com/T/#t

Changes in v3:
* Renamed adi,gain-milli to adi,aaf-gain-bp. Now it represents basis points
  (one hundredth of a percent).
* ad7768_channel_masks removed along with available_masks element in
  ad7768_chip_info struct. It does not add anything for single channels,
  so not needed, at least for now.
* New patch adding 64-bit fractional number types to math.h.
* Moved aaf gain parsing to its own function, and now returning after
  warning to avoid setting a variable when it shouldn't (avoid confusion).
* ad7768_set_pga_gain(): removed the pgia enable check, relying on the
  regmap cache.
* Addressed other review comments, see individual patches.

Changes in v2:
* adi,aaf-gain property renamed to adi,gain-milli. Default value added.
* fixed some commit messages. 
* Added 'select RATIONAL' to Kconfig.
* Added lock to protect PGA value access.
* rewrote AAF gain check and replaced error returns with warnings.
* Addressed other review comments, see individual patches.
* Link to v1: https://lore.kernel.org/linux-iio/cover.1754617360.git.Jonathan.Santos@analog.com/T/#t
---

Jonathan Santos (5):
  dt-bindings: iio: adc: ad7768-1: add new supported parts
  iio: adc: ad7768-1: introduce chip info for future multidevice support
  units: add PERCENT and BASIS_POINTS macros
  iio: adc: ad7768-1: squash __ad7768_write_raw() back to
    ad7768_write_raw()
  iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Family

 .../bindings/iio/adc/adi,ad7768-1.yaml        |  64 ++-
 drivers/iio/adc/Kconfig                       |   1 +
 drivers/iio/adc/ad7768-1.c                    | 428 ++++++++++++++++--
 include/linux/units.h                         |  14 +
 4 files changed, 453 insertions(+), 54 deletions(-)


base-commit: daea3a394a8b425a2dd206ab09eb37f0d1087d35
-- 
2.34.1


             reply	other threads:[~2025-12-17 12:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17  5:52 Jonathan Santos [this message]
2025-12-17  5:52 ` [PATCH v5 1/5] dt-bindings: iio: adc: ad7768-1: add new supported parts Jonathan Santos
2025-12-17  5:52 ` [PATCH v5 2/5] iio: adc: ad7768-1: introduce chip info for future multidevice support Jonathan Santos
2025-12-17  5:52 ` [PATCH v5 3/5] units: add PERCENT and BASIS_POINTS macros Jonathan Santos
2025-12-27 15:55   ` Jonathan Cameron
2025-12-27 16:48     ` Andy Shevchenko
2025-12-27 16:52     ` Andy Shevchenko
2025-12-27 16:53       ` Andy Shevchenko
2025-12-17  5:52 ` [PATCH v5 4/5] iio: adc: ad7768-1: refactor ad7768_write_raw() Jonathan Santos
2025-12-17  5:53 ` [PATCH v5 5/5] iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Family Jonathan Santos
2025-12-27 16:11   ` Jonathan Cameron

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.1765900411.git.Jonathan.Santos@analog.com \
    --to=jonathan.santos@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=jonath4nns@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@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 NNTP newsgroup(s).