devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] iio: adc: Add support for AD4170 series of ADCs
@ 2025-04-28 12:27 Marcelo Schmitt
  2025-04-28 12:27 ` [PATCH v2 1/7] dt-bindings: iio: adc: Add AD4170 Marcelo Schmitt
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Marcelo Schmitt @ 2025-04-28 12:27 UTC (permalink / raw)
  To: linux-iio, devicetree, linux-kernel
  Cc: jic23, lars, Michael.Hennerich, dlechner, nuno.sa, andy, robh,
	krzk+dt, conor+dt, marcelo.schmitt1

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 buffered ADC reading.
Patch 4 adds clock provider support
Patch 5 adds GPIO controller support.
Patch 6 adds internal temperature sensor support.
Patch 7 adds support for external RTD and bridge circuit sensors.

I believe to have updated the series according to all suggestions offered during
v1 review. The exceptions should be the IOVDD (discussed below) and regmap bulk
access which I decided to replace by a custom regmap_read/write implementation
instead.

Thank you for providing your insights and help.

Change log v1 -> v2

[IIO driver changes]
- Call gpio_set() at begining of gpio_direction_output() instead of at the end of it.
- Return -EPERM if try to set a GPIO configured for input.
- Now locking on state mutex before setting output GPIO values.
- Used gpiochio init_valid_mask() to only init available GPIOs.
- Replaced 3 regmap configs by regmap with custom reg_read/write implementation.
- Improved to support more than one external sensor connected.
- A few other minor improvements.

Previously, I thought IOVDD supply could be optional but it seems to be required.
I have only remote access to a setup with EVAL-AD4170-4 but am pretty sure the
link in the eval board was set to provide 3.3V to IOVDD pin.
Datasheet sais 'This supply sets the interface logic levels on the SPI interface
and powers an internal regulator for operation of the digital processing.'
Since IOVDD supply will presumably be enabled, I kept reading it's voltage
even though ADC channels might not use that info.

[device tree changes]
- Referenced adc.yaml from sensor-node.
- Merged property descriptions to reduce doc duplication.
- Every child node type is now in the example.
- Better described sensor-type property with a list of possible types.
- Updated adi,excitation-pins description to cover a use case I had overlooked.
- Added default to interrupt-names and to clock-names.
- Added support for clock-output-names
- Dropped '|' from descriptions when not needed.
- Added extra example

Link to v1: https://lore.kernel.org/linux-iio/cover.1744200264.git.marcelo.schmitt@analog.com/


Marcelo

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

Marcelo Schmitt (6):
  dt-bindings: iio: adc: Add AD4170
  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

 .../bindings/iio/adc/adi,ad4170.yaml          |  554 ++++
 MAINTAINERS                                   |    8 +
 drivers/iio/adc/Kconfig                       |   16 +
 drivers/iio/adc/Makefile                      |    1 +
 drivers/iio/adc/ad4170.c                      | 2846 +++++++++++++++++
 5 files changed, 3425 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad4170.yaml
 create mode 100644 drivers/iio/adc/ad4170.c


base-commit: 1c2409fe38d5c19015d69851d15ba543d1911932
-- 
2.47.2


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

end of thread, other threads:[~2025-05-12 13:22 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28 12:27 [PATCH v2 0/7] iio: adc: Add support for AD4170 series of ADCs Marcelo Schmitt
2025-04-28 12:27 ` [PATCH v2 1/7] dt-bindings: iio: adc: Add AD4170 Marcelo Schmitt
2025-05-09 18:56   ` Rob Herring
2025-05-11 15:27     ` Marcelo Schmitt
2025-04-28 12:28 ` [PATCH v2 2/7] iio: adc: Add basic support for AD4170 Marcelo Schmitt
2025-05-02 11:28   ` Andy Shevchenko
2025-05-12 13:23     ` Marcelo Schmitt
2025-05-04 18:21   ` Jonathan Cameron
2025-04-28 12:28 ` [PATCH v2 3/7] iio: adc: ad4170: Add support for buffered data capture Marcelo Schmitt
2025-04-29 22:00   ` Andy Shevchenko
2025-04-30 13:40     ` Marcelo Schmitt
2025-05-02  8:56       ` Andy Shevchenko
2025-05-04 17:27       ` Jonathan Cameron
2025-05-04 17:57   ` Jonathan Cameron
2025-04-28 12:28 ` [PATCH v2 4/7] iio: adc: ad4170: Add clock provider support Marcelo Schmitt
2025-04-29 22:10   ` Andy Shevchenko
2025-05-06  8:21   ` kernel test robot
2025-04-28 12:28 ` [PATCH v2 5/7] iio: adc: ad4170: Add GPIO controller support Marcelo Schmitt
2025-04-29 22:14   ` Andy Shevchenko
2025-05-04 17:50   ` Jonathan Cameron
2025-04-28 12:29 ` [PATCH v2 6/7] iio: adc: ad4170: Add support for internal temperature sensor Marcelo Schmitt
2025-04-29 22:16   ` Andy Shevchenko
2025-05-04 17:44   ` Jonathan Cameron
2025-04-28 12:29 ` [PATCH v2 7/7] iio: adc: ad4170: Add support for weigh scale and RTD sensors Marcelo Schmitt
2025-04-29 22:26   ` Andy Shevchenko
2025-05-01 19:50   ` kernel test robot
2025-05-04 17:42   ` 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).