devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 00/12] iio: adc: Add support for AD4170 series of ADCs
@ 2025-06-18 17:33 Marcelo Schmitt
  2025-06-18 17:34 ` [PATCH v6 01/12] dt-bindings: iio: adc: Add AD4170 Marcelo Schmitt
                   ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: Marcelo Schmitt @ 2025-06-18 17:33 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-gpio, linux-kernel
  Cc: jic23, lars, Michael.Hennerich, dlechner, nuno.sa, andy, robh,
	krzk+dt, conor+dt, linus.walleij, brgl, broonie, lgirdwood,
	marcelo.schmitt1

Hello,

This is version 6 of AD4170 support patch set.

To regulator framework maintainers:
The AD4170 and similar devices have a AVDD/AVSS pair of supply input pins that
allows to provide a bipolar power supply to the ADC. On that power scheme, the
AVSS input takes a negative voltage supply. Also, since those supplies can also
serve as reference to ADC conversions, the voltage level of each supply is
relevant to converting ADC output codes into milli voltage units (i.e. a
particular output code with ±2.5V AVSS/AVDD supply maps to a different voltage
than the same output code with 0V to 5V AVSS/AVDD supply). AD4170 also has
REFIN- and REFIN2- negative supplies that can occasionally be positive. For
better AD4170 support, we would need a way of reading negative voltages from
regulators, which doesn't seem to be currently supported by the regulator
framework.

There seems to be no opposition to having negative supplies on an old thread
about the subject [1]. Question is, do negative supply support still sounds
feasible?

[1]: https://lore.kernel.org/linux-iio/544AC56F16B56944AEC3BD4E3D59177137546EF3FC@LIMKCMBX1.ad.analog.com/

As always, thank you to all reviewers for your advice and patience.

This patch set adds support for Analog Devices AD4170 and similar sigma-delta ADCs.

Patch 1 adds device tree documentation for the parts.
Patch 2 adds basic device support.
Patch 3 adds support for calibration scale.
Patch 4 adds support for calibration bias.
Patch 5 adds sinc5+avg to filter_type_available IIO ABI documentation. (new patch)
Patch 6 adds support for sample frequency along with filter type configuration.
Patch 7 adds support for buffered ADC reading.
Patch 8 adds clock provider support
Patch 9 adds GPIO controller support.
Patch 10 adds internal temperature sensor support.
Patch 11 adds support for external RTD and bridge circuit sensors.
Patch 12 adds timestamp channel

Change log v5 -> v6

[device tree changes]
- Made reference-buffer string type.
- Moved required section before patternProperties.
- Made avss, refin1n, refin2n documentation open to accepting positive and
  negative voltage specifications where appropriate.

[Basic driver patch]
- Added trailing commas to enum declarations.
- Updated int pins_fn -> unsigned int pins_fn.
- Use local string to simplify dt parsing and error handling.
- Updated 'if (ret < 0)' to 'if (ret)' wherever appropriate.
- Expanded code comment to clarify that refp can only be >= at ad4170_get_input_range().
- Pass fwnode_property_read_u32() return to dev_err_probe() in case of error.
- Declared a define for the constant 2 byte size SPI instruction phase.
- Dropped use of static_assert().

[New patch - Add sinc5+avg to filter_type_available list ABI]

[Buffer support patch]
- Used local variable to minimize the risk of race conditions when checking IIO
  scan_mask.

[Clock provider patch]
- Now using device_property_present() to check #clock-cells presence.

Link to v5: https://lore.kernel.org/linux-iio/cover.1749582679.git.marcelo.schmitt@analog.com/ 
Link to v4: https://lore.kernel.org/linux-iio/cover.1748829860.git.marcelo.schmitt@analog.com/
Link to v3: https://lore.kernel.org/linux-iio/cover.1747083143.git.marcelo.schmitt@analog.com/
Link to v2: https://lore.kernel.org/linux-iio/cover.1745841276.git.marcelo.schmitt@analog.com/
Link to v1: https://lore.kernel.org/linux-iio/cover.1744200264.git.marcelo.schmitt@analog.com/

Ana-Maria Cusco (1):
  iio: adc: Add basic support for AD4170

Marcelo Schmitt (11):
  dt-bindings: iio: adc: Add AD4170
  iio: adc: ad4170: Add support for calibration gain
  iio: adc: ad4170: Add support for calibration bias
  Documentation: ABI: IIO: Add sinc5+avg to the filter_type_available
    list
  iio: adc: ad4170: Add digital filter and sample frequency config
    support
  iio: adc: ad4170: Add support for buffered data capture
  iio: adc: ad4170: Add clock provider support
  iio: adc: ad4170: Add GPIO controller support
  iio: adc: ad4170: Add support for internal temperature sensor
  iio: adc: ad4170: Add support for weigh scale and RTD sensors
  iio: adc: ad4170: Add timestamp channel

 Documentation/ABI/testing/sysfs-bus-iio       |    1 +
 .../bindings/iio/adc/adi,ad4170.yaml          |  558 +++
 MAINTAINERS                                   |    8 +
 drivers/iio/adc/Kconfig                       |   16 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/ad4170.c                      | 2994 +++++++++++++++++
 6 files changed, 3578 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4170.yaml
 create mode 100644 drivers/iio/adc/ad4170.c


base-commit: 4c6073fec2fee4827fa0dd8a4ab4e6f7bbc05ee6
-- 
2.47.2


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2025-06-22 14:21 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-18 17:33 [PATCH v6 00/12] iio: adc: Add support for AD4170 series of ADCs Marcelo Schmitt
2025-06-18 17:34 ` [PATCH v6 01/12] dt-bindings: iio: adc: Add AD4170 Marcelo Schmitt
2025-06-19 15:35   ` Conor Dooley
2025-06-22 13:44     ` Jonathan Cameron
2025-06-18 17:35 ` [PATCH v6 02/12] iio: adc: Add basic support for AD4170 Marcelo Schmitt
2025-06-22 14:08   ` Jonathan Cameron
2025-06-18 17:36 ` [PATCH v6 03/12] iio: adc: ad4170: Add support for calibration gain Marcelo Schmitt
2025-06-18 17:36 ` [PATCH v6 04/12] iio: adc: ad4170: Add support for calibration bias Marcelo Schmitt
2025-06-18 17:36 ` [PATCH v6 05/12] Documentation: ABI: IIO: Add sinc5+avg to the filter_type_available list Marcelo Schmitt
2025-06-22 14:09   ` Jonathan Cameron
2025-06-18 17:37 ` [PATCH v6 06/12] iio: adc: ad4170: Add digital filter and sample frequency config support Marcelo Schmitt
2025-06-20  2:38   ` kernel test robot
2025-06-22 14:12     ` Jonathan Cameron
2025-06-18 17:37 ` [PATCH v6 07/12] iio: adc: ad4170: Add support for buffered data capture Marcelo Schmitt
2025-06-22 14:18   ` Jonathan Cameron
2025-06-18 17:37 ` [PATCH v6 08/12] iio: adc: ad4170: Add clock provider support Marcelo Schmitt
2025-06-18 17:38 ` [PATCH v6 09/12] iio: adc: ad4170: Add GPIO controller support Marcelo Schmitt
2025-06-18 17:38 ` [PATCH v6 10/12] iio: adc: ad4170: Add support for internal temperature sensor Marcelo Schmitt
2025-06-18 17:38 ` [PATCH v6 11/12] iio: adc: ad4170: Add support for weigh scale and RTD sensors Marcelo Schmitt
2025-06-18 17:39 ` [PATCH v6 12/12] iio: adc: ad4170: Add timestamp channel Marcelo Schmitt
2025-06-22 14:21   ` Jonathan Cameron

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).