From: Tobias Sperling Subject: [PATCH 0/2] Support for TI ADS7128 and ADS7138 ADCs Date: Fri, 22 Nov 2024 16:15:35 +0100 Message-Id: <20241122-adc_ml-v1-0-0769f2e1bbc1@softing.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIABegQGcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxNDQyMj3cSU5PjcHN0Uw+RUC7NUC9Mko2QloOKCotS0zAqwQdGxtbUA/2k grlgAAAA= X-Change-ID: 20241122-adc_ml-d1ce86e85b2c To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Tobias Sperling X-Mailer: b4 0.15-dev-355e8 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732288552; l=1621; i=tobias.sperling@softing.com; s=20241122; h=from:subject:message-id; bh=TGa7Of0k80PmwcFhPdThmmvF7lbiviqdPAM1Y997XAU=; b=vaDfFwv9U9SBeSnnomZ3qhMudcfqPeU9OqSxBVHX7QlW7lY2WZg4ZysWJbp7pCrEg6fMqSDw+ 2mrkok1/BQ3BDUHotcBbPSsWhWJR5ESTKny1J0lm55NuuFp/BXdFRrE X-Developer-Key: i=tobias.sperling@softing.com; a=ed25519; pk=v7hgaMHsrA9ul4UXkBVUuwusS9PF3uHW/CC+gABI65E= X-Endpoint-Received: by B4 Relay for tobias.sperling@softing.com/20241122 with auth_id=281 List-Id: B4 Relay Submissions This patch series adds support for Texas Instruments ADS7128 and ADS7138, which are 12-bit, 8 channel analog-to-digital converters (ADCs) with build-in digital window comparator (DWC), using the I2C interface. The driver exposes the interfaces to read the raw values, as well as the minimum and maximum value for each channel. In addition several settings can be configured, like the DWC, sampling frequency or an averaging filter/oversampling. Interrupts triggered by the DWC, if configured, are then exposed as IIO events. ADS7128 differs in the addition of further hardware features, like a root-mean-square (RMS) and a zero-crossing-detect (ZCD) module, which are not yet supported by the driver. Regarding the I2C interface the chips using opcodes to define the way how the registeres are accessed, like single or multiple register(s) read/write or setting/clearing only bits. Changes in v1: - dt-bindings: Extended description Signed-off-by: Tobias Sperling --- Tobias Sperling (2): dt-bindings: iio: adc: Introduce ADS7138 iio: adc: Add driver for ADS7128 / ADS7138 .../devicetree/bindings/iio/adc/ti,ads7138.yaml | 64 ++ drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-ads7138.c | 796 +++++++++++++++++++++ 4 files changed, 871 insertions(+) --- base-commit: 2d5404caa8c7bb5c4e0435f94b28834ae5456623 change-id: 20241122-adc_ml-d1ce86e85b2c Best regards, -- Tobias Sperling