* [PATCH 1/3] iio: adc: ad7380: add adaq4381-4 support
2025-02-26 14:50 [PATCH 0/3] ad7380: add adaq4381-4 support Julien Stephan
@ 2025-02-26 14:50 ` Julien Stephan
2025-02-26 14:50 ` [PATCH 2/3] dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts Julien Stephan
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Julien Stephan @ 2025-02-26 14:50 UTC (permalink / raw)
To: Michael Hennerich, Nuno Sá, David Lechner,
Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet
Cc: linux-iio, linux-kernel, devicetree, linux-doc, Michael Hennerich,
Julien Stephan
adaq4381-4 is the 14 bits version of adaq4380-1 chip. Add support for
it.
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
drivers/iio/adc/ad7380.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c
index f232ad1a49634baeedc655916bc7a967604a1206..407930f1f5dd107154a6c34c6afd4429ebb69826 100644
--- a/drivers/iio/adc/ad7380.c
+++ b/drivers/iio/adc/ad7380.c
@@ -15,6 +15,7 @@
* ad7386/7/8-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7386-4-7387-4-7388-4.pdf
* adaq4370-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4370-4.pdf
* adaq4380-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4380-4.pdf
+ * adaq4381-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4381-4.pdf
*/
#include <linux/align.h>
@@ -287,6 +288,7 @@ DEFINE_AD7380_2_CHANNEL(ad7381_channels, 14, 1, s);
DEFINE_AD7380_4_CHANNEL(ad7380_4_channels, 16, 1, s);
DEFINE_AD7380_4_CHANNEL(ad7381_4_channels, 14, 1, s);
DEFINE_ADAQ4380_4_CHANNEL(adaq4380_4_channels, 16, 1, s);
+DEFINE_ADAQ4380_4_CHANNEL(adaq4381_4_channels, 14, 1, s);
/* pseudo differential */
DEFINE_AD7380_2_CHANNEL(ad7383_channels, 16, 0, s);
DEFINE_AD7380_2_CHANNEL(ad7384_channels, 14, 0, s);
@@ -599,6 +601,19 @@ static const struct ad7380_chip_info adaq4380_4_chip_info = {
.timing_specs = &ad7380_4_timing,
};
+static const struct ad7380_chip_info adaq4381_4_chip_info = {
+ .name = "adaq4381-4",
+ .channels = adaq4381_4_channels,
+ .num_channels = ARRAY_SIZE(adaq4381_4_channels),
+ .num_simult_channels = 4,
+ .supplies = adaq4380_supplies,
+ .num_supplies = ARRAY_SIZE(adaq4380_supplies),
+ .adaq_internal_ref_only = true,
+ .has_hardware_gain = true,
+ .available_scan_masks = ad7380_4_channel_scan_masks,
+ .timing_specs = &ad7380_4_timing,
+};
+
struct ad7380_state {
const struct ad7380_chip_info *chip_info;
struct spi_device *spi;
@@ -1582,6 +1597,7 @@ static const struct of_device_id ad7380_of_match_table[] = {
{ .compatible = "adi,ad7388-4", .data = &ad7388_4_chip_info },
{ .compatible = "adi,adaq4370-4", .data = &adaq4370_4_chip_info },
{ .compatible = "adi,adaq4380-4", .data = &adaq4380_4_chip_info },
+ { .compatible = "adi,adaq4381-4", .data = &adaq4381_4_chip_info },
{ }
};
@@ -1602,6 +1618,7 @@ static const struct spi_device_id ad7380_id_table[] = {
{ "ad7388-4", (kernel_ulong_t)&ad7388_4_chip_info },
{ "adaq4370-4", (kernel_ulong_t)&adaq4370_4_chip_info },
{ "adaq4380-4", (kernel_ulong_t)&adaq4380_4_chip_info },
+ { "adaq4381-4", (kernel_ulong_t)&adaq4381_4_chip_info },
{ }
};
MODULE_DEVICE_TABLE(spi, ad7380_id_table);
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/3] dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts
2025-02-26 14:50 [PATCH 0/3] ad7380: add adaq4381-4 support Julien Stephan
2025-02-26 14:50 ` [PATCH 1/3] iio: adc: " Julien Stephan
@ 2025-02-26 14:50 ` Julien Stephan
2025-03-03 13:37 ` Rob Herring (Arm)
2025-02-26 14:50 ` [PATCH 3/3] docs: iio: ad7380: add adaq4381-4 Julien Stephan
2025-02-26 16:14 ` [PATCH 0/3] ad7380: add adaq4381-4 support David Lechner
3 siblings, 1 reply; 7+ messages in thread
From: Julien Stephan @ 2025-02-26 14:50 UTC (permalink / raw)
To: Michael Hennerich, Nuno Sá, David Lechner,
Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet
Cc: linux-iio, linux-kernel, devicetree, linux-doc, Michael Hennerich,
Julien Stephan
adaq4381-4 is the 14 bits version of adaq4380-1 chip. Add support for
it.
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
index ada08005b3cd1ce7ba13f96484a33fdee0e83a1c..ff4f5c21c5482b77ee2774b01ad6d426e68cf207 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
@@ -27,6 +27,7 @@ description: |
* https://www.analog.com/en/products/ad7388-4.html
* https://www.analog.com/en/products/adaq4370-4.html
* https://www.analog.com/en/products/adaq4380-4.html
+ * https://www.analog.com/en/products/adaq4381-4.html
$ref: /schemas/spi/spi-peripheral-props.yaml#
@@ -50,6 +51,7 @@ properties:
- adi,ad7388-4
- adi,adaq4370-4
- adi,adaq4380-4
+ - adi,adaq4381-4
reg:
maxItems: 1
@@ -201,6 +203,7 @@ allOf:
- adi,ad7380-4
- adi,adaq4370-4
- adi,adaq4380-4
+ - adi,adaq4381-4
then:
properties:
refio-supply: false
@@ -218,6 +221,7 @@ allOf:
enum:
- adi,adaq4370-4
- adi,adaq4380-4
+ - adi,adaq4381-4
then:
required:
- vs-p-supply
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/3] dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts
2025-02-26 14:50 ` [PATCH 2/3] dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts Julien Stephan
@ 2025-03-03 13:37 ` Rob Herring (Arm)
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring (Arm) @ 2025-03-03 13:37 UTC (permalink / raw)
To: Julien Stephan
Cc: linux-doc, Krzysztof Kozlowski, Jonathan Cameron, Jonathan Corbet,
Lars-Peter Clausen, linux-iio, devicetree, Michael Hennerich,
linux-kernel, David Lechner, Conor Dooley, Michael Hennerich,
Nuno Sá
On Wed, 26 Feb 2025 15:50:04 +0100, Julien Stephan wrote:
> adaq4381-4 is the 14 bits version of adaq4380-1 chip. Add support for
> it.
>
> Signed-off-by: Julien Stephan <jstephan@baylibre.com>
> ---
> Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] docs: iio: ad7380: add adaq4381-4
2025-02-26 14:50 [PATCH 0/3] ad7380: add adaq4381-4 support Julien Stephan
2025-02-26 14:50 ` [PATCH 1/3] iio: adc: " Julien Stephan
2025-02-26 14:50 ` [PATCH 2/3] dt-bindings: iio: adc: ad7380: add adaq4381-4 compatible parts Julien Stephan
@ 2025-02-26 14:50 ` Julien Stephan
2025-02-26 16:14 ` [PATCH 0/3] ad7380: add adaq4381-4 support David Lechner
3 siblings, 0 replies; 7+ messages in thread
From: Julien Stephan @ 2025-02-26 14:50 UTC (permalink / raw)
To: Michael Hennerich, Nuno Sá, David Lechner,
Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet
Cc: linux-iio, linux-kernel, devicetree, linux-doc, Michael Hennerich,
Julien Stephan
adaq4381-4 is the 14 bits version of adaq4380-1 chip. Add it to the
documentation.
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
Documentation/iio/ad7380.rst | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/iio/ad7380.rst b/Documentation/iio/ad7380.rst
index cff688bcc2d9601a9faf42d5e9c217486639ca66..35232a0e3ad730c19b5201b74280bdb6deaa9667 100644
--- a/Documentation/iio/ad7380.rst
+++ b/Documentation/iio/ad7380.rst
@@ -29,6 +29,7 @@ The following chips are supported by this driver:
* `AD7388-4 <https://www.analog.com/en/products/ad7388-4.html>`_
* `ADAQ4370-4 <https://www.analog.com/en/products/adaq4370-4.html>`_
* `ADAQ4380-4 <https://www.analog.com/en/products/adaq4380-4.html>`_
+* `ADAQ4381-4 <https://www.analog.com/en/products/adaq4381-4.html>`_
Supported features
@@ -52,8 +53,8 @@ declared in the device tree as ``refin-supply``.
ADAQ devices
~~~~~~~~~~~~
-adaq4370-4 and adaq4380-4 don't have an external reference, but use a 3.3V
-internal reference derived from one of its supplies (``refin-supply``)
+ADAQ devices don't have an external reference, but use a 3.3V internal reference
+derived from one of its supplies (``refin-supply``)
All other devices from ad738x family
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
2.47.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] ad7380: add adaq4381-4 support
2025-02-26 14:50 [PATCH 0/3] ad7380: add adaq4381-4 support Julien Stephan
` (2 preceding siblings ...)
2025-02-26 14:50 ` [PATCH 3/3] docs: iio: ad7380: add adaq4381-4 Julien Stephan
@ 2025-02-26 16:14 ` David Lechner
2025-03-04 15:06 ` Jonathan Cameron
3 siblings, 1 reply; 7+ messages in thread
From: David Lechner @ 2025-02-26 16:14 UTC (permalink / raw)
To: Julien Stephan, Michael Hennerich, Nuno Sá,
Lars-Peter Clausen, Jonathan Cameron, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet
Cc: linux-iio, linux-kernel, devicetree, linux-doc
On 2/26/25 8:50 AM, Julien Stephan wrote:
> ADAQ4381-4 is the 14 bits version of the ADAQ4380-4. It is compatible
> with the ad7380 driver, so add its support and documentation, in driver,
> doc, and bindings.
>
> Signed-off-by: Julien Stephan <jstephan@baylibre.com>
> ---
Reviewed-by: David Lechner <dlechner@baylibre.com>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 0/3] ad7380: add adaq4381-4 support
2025-02-26 16:14 ` [PATCH 0/3] ad7380: add adaq4381-4 support David Lechner
@ 2025-03-04 15:06 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2025-03-04 15:06 UTC (permalink / raw)
To: David Lechner
Cc: Julien Stephan, Michael Hennerich, Nuno Sá,
Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Jonathan Corbet, linux-iio, linux-kernel,
devicetree, linux-doc
On Wed, 26 Feb 2025 10:14:40 -0600
David Lechner <dlechner@baylibre.com> wrote:
> On 2/26/25 8:50 AM, Julien Stephan wrote:
> > ADAQ4381-4 is the 14 bits version of the ADAQ4380-4. It is compatible
> > with the ad7380 driver, so add its support and documentation, in driver,
> > doc, and bindings.
> >
> > Signed-off-by: Julien Stephan <jstephan@baylibre.com>
> > ---
> Reviewed-by: David Lechner <dlechner@baylibre.com>
>
>
Applied,
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 7+ messages in thread