lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1750258776.git.marcelo.schmitt@analog.com>
Date: Wed, 18 Jun 2025 14:33:49 -0300
From: Marcelo Schmitt <marcelo.schmitt@...log.com>
To: <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <jic23@...nel.org>, <lars@...afoo.de>, <Michael.Hennerich@...log.com>,
        <dlechner@...libre.com>, <nuno.sa@...log.com>, <andy@...nel.org>,
        <robh@...nel.org>, <krzk+dt@...nel.org>, <conor+dt@...nel.org>,
        <linus.walleij@...aro.org>, <brgl@...ev.pl>, <broonie@...nel.org>,
        <lgirdwood@...il.com>, <marcelo.schmitt1@...il.com>
Subject: [PATCH v6 00/12] iio: adc: Add support for AD4170 series of ADCs

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ