Add support for AD7191
From: | Alisa-Dariana Roman <alisadariana-AT-gmail.com> | |
To: | "Rob Herring (Arm)" <robh-AT-kernel.org>, Alisa-Dariana Roman <alisa.roman-AT-analog.com>, Jonathan Cameron <Jonathan.Cameron-AT-huawei.com>, Ramona Gradinariu <ramona.bolboaca13-AT-gmail.com>, David Lechner <dlechner-AT-baylibre.com>, linux-iio-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, linux-doc-AT-vger.kernel.org | |
Subject: | [PATCH v4 0/3] Add support for AD7191 | |
Date: | Mon, 03 Feb 2025 15:31:25 +0200 | |
Message-ID: | <20250203133254.313106-1-alisa.roman@analog.com> | |
Cc: | Lars-Peter Clausen <lars-AT-metafoo.de>, Michael Hennerich <Michael.Hennerich-AT-analog.com>, Jonathan Cameron <jic23-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Jonathan Corbet <corbet-AT-lwn.net> | |
Archive-link: | Article |
Thank you all for your feedback! Here is the updated series of patches! Kind regards, Alisa-Dariana Roman. --- v3: https://lore.kernel.org/all/20250129143054.225322-1-alisa... v3 -> v4: - addressed all replies for v3 - refactored the scale and sampling frequencies configurations to use 2 different arrays for gpio case vs pinstrap case v2: https://lore.kernel.org/all/20250122132821.126600-1-alisa... v2 -> v3: - correct binding title - remove clksel_state and clksel_gpio, assume the clksel pin is always pinstrapped - rephrase clocks description accordingly - simplify binding constraints - specify in binding description that PDOWN must be connected to SPI's controller's CS - add minItems for gpios in bindings - make scope explicit for mutex guard - remove spi irq check - add id_table to spi_driver struct - changed comments as suggested - use spi_message_init_with_transfers() - default returns an error in ad7191_set_mode() - replace hard-coded 2 with st->pga_gpios->ndescs - use gpiod_set_array_value_cansleep() - change .storagebits to 32 - check return value for ad_sd_init() - change to adi,odr-value and adi,pga-value, which now accepts the value as suggested - modify variables names and refactor the setup of odr and pga gpios, indexes and available arrays into ad7191_config_setup(), since they are all related - add ad7191.rst v1: https://lore.kernel.org/all/20241221155926.81954-1-alisa.... v1 -> v2: - removed patch adding function in ad_sigma_delta.h/.c - added a function set_cs() for asserting/deasserting the cs - handle pinstrapping cases - refactored all clock handling - updated bindings: corrected and added new things - -> address of the channels is used in set_channel() - addressed all the other changes