Skip to content

Add support for ADAQ776x-1 ADC Family

Jonathan Santos linux-devicetree linux-iio lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 5 repliesIn review
  2. v55 patches 7 repliesSuperseded
  3. v44 patches 3 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches8 repliesSuperseded
v24 patches12 repliesSuperseded
v14 patches19 repliesSuperseded

Changes in v6 from the cover letter

* Use Pattern PER* for all percentage-related macros and include macros
for Per mille and per cent mille units.
* Refactored ad7768_parse_aaf_gain() to improve cleanliness and readability.
* Link to v5: https://lore.kernel.org/linux-iio/[email protected]/T/#t/

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5dt-bindings: iio: adc: ad7768-1: add new supported partsDocumentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml+60 -40 replies
2/5iio: adc: ad7768-1: introduce chip info for future multidevice supportdrivers/iio/adc/ad7768-1.c+41 -230 replies
3/5units: add conversion macros for percentage related unitsinclude/linux/units.h+19 -02 replies
4/5iio: adc: ad7768-1: refactor ad7768_write_raw()drivers/iio/adc/ad7768-1.c+26 -240 replies
5/5iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Familydrivers/iio/adc/Kconfig drivers/iio/adc/ad7768-1.c+308 -42 replies

Reviews trailers per patch

2 of 5 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiAndy Shevchenko
1/5R-b
2/5
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/5] Add support for ADAQ776x-1 ADC Family

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 v6:
* Use Pattern PER* for all percentage-related macros and include macros
for Per mille and per cent mille units.
* Refactored ad7768_parse_aaf_gain() to improve cleanliness and readability.
* Link to v5: https://lore.kernel.org/linux-iio/[email protected]/T/#t/

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/[email protected]/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/[email protected]/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/[email protected]/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 conversion macros for percentage related units
iio: adc: ad7768-1: refactor 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                    | 423 +++++++++++++++---
 include/linux/units.h                         |  19 +
 4 files changed, 453 insertions(+), 54 deletions(-)

base-commit: e0bc6d7e258486c10bb11e31fd4421c134063b1d

Signature · 1 line
2.34.1