devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add support for AD4113
@ 2024-08-09 10:33 Dumitru Ceclan via B4 Relay
  2024-08-09 10:33 ` [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113 Dumitru Ceclan via B4 Relay
  2024-08-09 10:33 ` [PATCH v2 2/2] iio: " Dumitru Ceclan via B4 Relay
  0 siblings, 2 replies; 13+ messages in thread
From: Dumitru Ceclan via B4 Relay @ 2024-08-09 10:33 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: mitrutzceclan, linux-iio, devicetree, linux-kernel,
	Dumitru Ceclan

This patch series adds support for the AD4113 ADC within the existing
AD7173 driver.

The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
converter (ADC) that integrates an analog front end (AFE) for four
fully differential or eight single-ended inputs.

The part is not released yet and the documentation is not public.
Register map is identical to AD4114 besides the lower width data
register and the GPIO register.

Particularities of this model:
- 16 bit data register
- no temperature sensor
- no current inputs
- input buffers
- internal reference
- external reference REF-/REF+
- no second external reference REF2-/REF2+
- no AVDD2 supply
- 2 GPIO pins with config bits starting at a higher position in register
- 8 VINx inputs with voltage divider
- 16 channel registers and 8 setup registers

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
---
Changes in v2:
- correctly set realbits and storagebits to 16 in iio_chan_spec
- describe bindings restrictions in commit message due to lack of
  sufficient diff context
- describe model differences better in cover letter
- Link to v1: https://lore.kernel.org/r/20240807-ad4113-v1-0-2d338f702c7b@analog.com

---
Dumitru Ceclan (2):
      dt-bindings: adc: ad7173: add support for ad4113
      iio: adc: ad7173: add support for ad4113

 .../devicetree/bindings/iio/adc/adi,ad7173.yaml    |  3 ++
 drivers/iio/adc/ad7173.c                           | 36 +++++++++++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)
---
base-commit: 1c61e13d7dc9003662bd7fd6064dfea67e64b014
change-id: 20240725-ad4113-baa63ff99245

Best regards,
-- 
Dumitru Ceclan <dumitru.ceclan@analog.com>



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

* [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113
  2024-08-09 10:33 [PATCH v2 0/2] Add support for AD4113 Dumitru Ceclan via B4 Relay
@ 2024-08-09 10:33 ` Dumitru Ceclan via B4 Relay
  2024-08-09 14:21   ` Conor Dooley
  2024-08-09 10:33 ` [PATCH v2 2/2] iio: " Dumitru Ceclan via B4 Relay
  1 sibling, 1 reply; 13+ messages in thread
From: Dumitru Ceclan via B4 Relay @ 2024-08-09 10:33 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: mitrutzceclan, linux-iio, devicetree, linux-kernel,
	Dumitru Ceclan

From: Dumitru Ceclan <dumitru.ceclan@analog.com>

This commit adds bindings support for AD4113.

The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
converter (ADC) that integrates an analog front end (AFE) for four
fully differential or eight single-ended inputs.

Added ad4113 to the compatible list and the "avdd2-supply: false"
restriction.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
---
 Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
index 17c5d39cc2c1..ad15cf9bc2ff 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
@@ -28,6 +28,7 @@ description: |
   Datasheets for supported chips:
     https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
     https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
+    <AD4113: not released yet>
     https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf
     https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf
     https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf
@@ -44,6 +45,7 @@ properties:
     enum:
       - adi,ad4111
       - adi,ad4112
+      - adi,ad4113
       - adi,ad4114
       - adi,ad4115
       - adi,ad4116
@@ -331,6 +333,7 @@ allOf:
             enum:
               - adi,ad4111
               - adi,ad4112
+              - adi,ad4113
               - adi,ad4114
               - adi,ad4115
               - adi,ad4116

-- 
2.43.0



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

* [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 10:33 [PATCH v2 0/2] Add support for AD4113 Dumitru Ceclan via B4 Relay
  2024-08-09 10:33 ` [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113 Dumitru Ceclan via B4 Relay
@ 2024-08-09 10:33 ` Dumitru Ceclan via B4 Relay
  2024-08-09 12:26   ` Nuno Sá
  2024-08-09 14:30   ` Christophe JAILLET
  1 sibling, 2 replies; 13+ messages in thread
From: Dumitru Ceclan via B4 Relay @ 2024-08-09 10:33 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: mitrutzceclan, linux-iio, devicetree, linux-kernel,
	Dumitru Ceclan

From: Dumitru Ceclan <dumitru.ceclan@analog.com>

This commit adds support for the AD4113 ADC.
The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
converter (ADC) that integrates an analog front end (AFE) for four
fully differential or eight single-ended inputs.

Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
---
 drivers/iio/adc/ad7173.c | 36 +++++++++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index a854f2d30174..3ac09d326472 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -3,7 +3,7 @@
  * AD717x and AD411x family SPI ADC driver
  *
  * Supported devices:
- *  AD4111/AD4112/AD4114/AD4115/AD4116
+ *  AD4111/AD4112/AD4113/AD4114/AD4115/AD4116
  *  AD7172-2/AD7172-4/AD7173-8/AD7175-2
  *  AD7175-8/AD7176-2/AD7177-2
  *
@@ -84,6 +84,7 @@
 #define AD4111_ID			AD7173_ID
 #define AD4112_ID			AD7173_ID
 #define AD4114_ID			AD7173_ID
+#define AD4113_ID			0x31D0
 #define AD4116_ID			0x34d0
 #define AD4115_ID			0x38d0
 #define AD7175_8_ID			0x3cd0
@@ -170,6 +171,7 @@ struct ad7173_device_info {
 	bool has_temp;
 	/* ((AVDD1 − AVSS)/5) */
 	bool has_pow_supply_monitoring;
+	bool data_reg_only_16bit;
 	bool has_input_buf;
 	bool has_int_ref;
 	bool has_ref2;
@@ -294,6 +296,24 @@ static const struct ad7173_device_info ad4112_device_info = {
 	.num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates),
 };
 
+static const struct ad7173_device_info ad4113_device_info = {
+	.name = "ad4113",
+	.id = AD4113_ID,
+	.num_voltage_in_div = 8,
+	.num_channels = 16,
+	.num_configs = 8,
+	.num_voltage_in = 8,
+	.num_gpios = 2,
+	.data_reg_only_16bit = true,
+	.higher_gpio_bits = true,
+	.has_vincom_input = true,
+	.has_input_buf = true,
+	.has_int_ref = true,
+	.clock = 2 * HZ_PER_MHZ,
+	.sinc5_data_rates = ad7173_sinc5_data_rates,
+	.num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates),
+};
+
 static const struct ad7173_device_info ad4114_device_info = {
 	.name = "ad4114",
 	.id = AD4114_ID,
@@ -988,6 +1008,13 @@ static const struct iio_info ad7173_info = {
 	.update_scan_mode = ad7173_update_scan_mode,
 };
 
+static const struct iio_scan_type ad4113_scan_type = {
+	.sign = 'u',
+	.realbits = 16,
+	.storagebits = 16,
+	.endianness = IIO_BE,
+};
+
 static const struct iio_chan_spec ad7173_channel_template = {
 	.type = IIO_VOLTAGE,
 	.indexed = 1,
@@ -1229,6 +1256,8 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
 		chan_st_priv->cfg.input_buf = st->info->has_input_buf;
 		chan_st_priv->cfg.ref_sel = AD7173_SETUP_REF_SEL_INT_REF;
 		st->adc_mode |= AD7173_ADC_MODE_REF_EN;
+		if (st->info->data_reg_only_16bit)
+			chan_arr[chan_index].scan_type = ad4113_scan_type;
 
 		chan_index++;
 	}
@@ -1309,6 +1338,9 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
 			chan_st_priv->ain = AD7173_CH_ADDRESS(ain[0], ain[1]);
 		}
 
+		if (st->info->data_reg_only_16bit)
+			chan_arr[chan_index].scan_type = ad4113_scan_type;
+
 		chan_index++;
 	}
 	return 0;
@@ -1437,6 +1469,7 @@ static int ad7173_probe(struct spi_device *spi)
 static const struct of_device_id ad7173_of_match[] = {
 	{ .compatible = "adi,ad4111",	.data = &ad4111_device_info },
 	{ .compatible = "adi,ad4112",	.data = &ad4112_device_info },
+	{ .compatible = "adi,ad4113",	.data = &ad4113_device_info },
 	{ .compatible = "adi,ad4114",	.data = &ad4114_device_info },
 	{ .compatible = "adi,ad4115",	.data = &ad4115_device_info },
 	{ .compatible = "adi,ad4116",	.data = &ad4116_device_info },
@@ -1454,6 +1487,7 @@ MODULE_DEVICE_TABLE(of, ad7173_of_match);
 static const struct spi_device_id ad7173_id_table[] = {
 	{ "ad4111",   (kernel_ulong_t)&ad4111_device_info },
 	{ "ad4112",   (kernel_ulong_t)&ad4112_device_info },
+	{ "ad4113",   (kernel_ulong_t)&ad4113_device_info },
 	{ "ad4114",   (kernel_ulong_t)&ad4114_device_info },
 	{ "ad4115",   (kernel_ulong_t)&ad4115_device_info },
 	{ "ad4116",   (kernel_ulong_t)&ad4116_device_info },

-- 
2.43.0



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

* Re: [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 10:33 ` [PATCH v2 2/2] iio: " Dumitru Ceclan via B4 Relay
@ 2024-08-09 12:26   ` Nuno Sá
  2024-08-09 12:32     ` Ceclan, Dumitru
  2024-08-09 14:30   ` Christophe JAILLET
  1 sibling, 1 reply; 13+ messages in thread
From: Nuno Sá @ 2024-08-09 12:26 UTC (permalink / raw)
  To: dumitru.ceclan, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: mitrutzceclan, linux-iio, devicetree, linux-kernel

On Fri, 2024-08-09 at 13:33 +0300, Dumitru Ceclan via B4 Relay wrote:
> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
> 
> This commit adds support for the AD4113 ADC.
> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
> converter (ADC) that integrates an analog front end (AFE) for four
> fully differential or eight single-ended inputs.
> 
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
> ---

Any reason to drop my tag :)? There a b4 command that can help you with it.

- Nuno Sá



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

* Re: [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 12:26   ` Nuno Sá
@ 2024-08-09 12:32     ` Ceclan, Dumitru
  2024-08-09 14:12       ` Nuno Sá
  0 siblings, 1 reply; 13+ messages in thread
From: Ceclan, Dumitru @ 2024-08-09 12:32 UTC (permalink / raw)
  To: Nuno Sá, dumitru.ceclan, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-iio, devicetree, linux-kernel

On 09/08/2024 15:26, Nuno Sá wrote:
> On Fri, 2024-08-09 at 13:33 +0300, Dumitru Ceclan via B4 Relay wrote:
>> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
>>
>> This commit adds support for the AD4113 ADC.
>> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
>> converter (ADC) that integrates an analog front end (AFE) for four
>> fully differential or eight single-ended inputs.
>>
>> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
>> ---
> 
> Any reason to drop my tag :)? There a b4 command that can help you with it.
> 
> - Nuno Sá
> 
> 

Yes, I added a new field to the device info struct and changed dt parsing
because I missed in V1 that this model actually has a 16 bit data register.
I considered that the rb would not apply anymore and it would need a re-review.

Thanks for the b4 suggestion but this was intentional :))

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

* Re: [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 12:32     ` Ceclan, Dumitru
@ 2024-08-09 14:12       ` Nuno Sá
  0 siblings, 0 replies; 13+ messages in thread
From: Nuno Sá @ 2024-08-09 14:12 UTC (permalink / raw)
  To: Ceclan, Dumitru, dumitru.ceclan, Lars-Peter Clausen,
	Michael Hennerich, Jonathan Cameron, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-iio, devicetree, linux-kernel

On Fri, 2024-08-09 at 15:32 +0300, Ceclan, Dumitru wrote:
> On 09/08/2024 15:26, Nuno Sá wrote:
> > On Fri, 2024-08-09 at 13:33 +0300, Dumitru Ceclan via B4 Relay wrote:
> > > From: Dumitru Ceclan <dumitru.ceclan@analog.com>
> > > 
> > > This commit adds support for the AD4113 ADC.
> > > The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
> > > converter (ADC) that integrates an analog front end (AFE) for four
> > > fully differential or eight single-ended inputs.
> > > 
> > > Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
> > > ---
> > 
> > Any reason to drop my tag :)? There a b4 command that can help you with it.
> > 
> > - Nuno Sá
> > 
> > 
> 
> Yes, I added a new field to the device info struct and changed dt parsing
> because I missed in V1 that this model actually has a 16 bit data register.
> I considered that the rb would not apply anymore and it would need a re-review.
> 
> Thanks for the b4 suggestion but this was intentional :))

Got it. Next time mention that in the cover...

Reviewed-by: Nuno Sa <nuno.sa@analog.com>


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

* Re: [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113
  2024-08-09 10:33 ` [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113 Dumitru Ceclan via B4 Relay
@ 2024-08-09 14:21   ` Conor Dooley
  2024-08-09 14:32     ` Ceclan, Dumitru
  0 siblings, 1 reply; 13+ messages in thread
From: Conor Dooley @ 2024-08-09 14:21 UTC (permalink / raw)
  To: dumitru.ceclan
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, mitrutzceclan,
	linux-iio, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

On Fri, Aug 09, 2024 at 01:33:24PM +0300, Dumitru Ceclan via B4 Relay wrote:
> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
> 
> This commit adds bindings support for AD4113.
> 
> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
> converter (ADC) that integrates an analog front end (AFE) for four
> fully differential or eight single-ended inputs.
> 
> Added ad4113 to the compatible list and the "avdd2-supply: false"
> restriction.
> 
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
> ---
>  Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> index 17c5d39cc2c1..ad15cf9bc2ff 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> @@ -28,6 +28,7 @@ description: |
>    Datasheets for supported chips:
>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
> +    <AD4113: not released yet>

Am I meant to ack it with this placeholder? When will the document be
released?
Acked-by: Conor Dooley <conor.dooley@microchip.com>

>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf
>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf
>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf
> @@ -44,6 +45,7 @@ properties:
>      enum:
>        - adi,ad4111
>        - adi,ad4112
> +      - adi,ad4113
>        - adi,ad4114
>        - adi,ad4115
>        - adi,ad4116
> @@ -331,6 +333,7 @@ allOf:
>              enum:
>                - adi,ad4111
>                - adi,ad4112
> +              - adi,ad4113
>                - adi,ad4114
>                - adi,ad4115
>                - adi,ad4116
> 
> -- 
> 2.43.0
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 10:33 ` [PATCH v2 2/2] iio: " Dumitru Ceclan via B4 Relay
  2024-08-09 12:26   ` Nuno Sá
@ 2024-08-09 14:30   ` Christophe JAILLET
  2024-08-09 14:40     ` Ceclan, Dumitru
  1 sibling, 1 reply; 13+ messages in thread
From: Christophe JAILLET @ 2024-08-09 14:30 UTC (permalink / raw)
  To: devnull+dumitru.ceclan.analog.com
  Cc: Michael.Hennerich, conor+dt, devicetree, dumitru.ceclan, jic23,
	krzk+dt, lars, linux-iio, linux-kernel, mitrutzceclan, robh

Le 09/08/2024 à 12:33, Dumitru Ceclan via B4 Relay a écrit :
> From: Dumitru Ceclan <dumitru.ceclan-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> 
> This commit adds support for the AD4113 ADC.
> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
> converter (ADC) that integrates an analog front end (AFE) for four
> fully differential or eight single-ended inputs.
> 
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
> ---
>   drivers/iio/adc/ad7173.c | 36 +++++++++++++++++++++++++++++++++++-
>   1 file changed, 35 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
> index a854f2d30174..3ac09d326472 100644
> --- a/drivers/iio/adc/ad7173.c
> +++ b/drivers/iio/adc/ad7173.c
> @@ -3,7 +3,7 @@
>    * AD717x and AD411x family SPI ADC driver
>    *
>    * Supported devices:
> - *  AD4111/AD4112/AD4114/AD4115/AD4116
> + *  AD4111/AD4112/AD4113/AD4114/AD4115/AD4116
>    *  AD7172-2/AD7172-4/AD7173-8/AD7175-2
>    *  AD7175-8/AD7176-2/AD7177-2
>    *
> @@ -84,6 +84,7 @@
>   #define AD4111_ID			AD7173_ID
>   #define AD4112_ID			AD7173_ID
>   #define AD4114_ID			AD7173_ID
> +#define AD4113_ID			0x31D0

Nitpick: others are in lowercase --> 0x31d0

>   #define AD4116_ID			0x34d0
>   #define AD4115_ID			0x38d0
>   #define AD7175_8_ID			0x3cd0

Other than that, is there any reason to have this "random" order for 
these defines?

CJ





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

* Re: [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113
  2024-08-09 14:21   ` Conor Dooley
@ 2024-08-09 14:32     ` Ceclan, Dumitru
  2024-08-09 15:09       ` Conor Dooley
  0 siblings, 1 reply; 13+ messages in thread
From: Ceclan, Dumitru @ 2024-08-09 14:32 UTC (permalink / raw)
  To: Conor Dooley, dumitru.ceclan
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-iio,
	devicetree, linux-kernel

On 09/08/2024 17:21, Conor Dooley wrote:
> On Fri, Aug 09, 2024 at 01:33:24PM +0300, Dumitru Ceclan via B4 Relay wrote:
>> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
>>
>> This commit adds bindings support for AD4113.
>>
>> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
>> converter (ADC) that integrates an analog front end (AFE) for four
>> fully differential or eight single-ended inputs.
>>
>> Added ad4113 to the compatible list and the "avdd2-supply: false"
>> restriction.
>>
>> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
>> ---
>>  Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
>> index 17c5d39cc2c1..ad15cf9bc2ff 100644
>> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
>> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
>> @@ -28,6 +28,7 @@ description: |
>>    Datasheets for supported chips:
>>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
>>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
>> +    <AD4113: not released yet>
> 
> Am I meant to ack it with this placeholder? When will the document be
> released?
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> 
Not really sure tbh, up to you. The document will be released in the upcoming months.

If it's considered best to wait until the docs are public and send another
version with the correct link. 
If not, and maintainers consider that these changes can be accepted even
without viewing the datasheet, I'll send a patch when it goes public.

 
>>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4114.pdf
>>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4115.pdf
>>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4116.pdf
>> @@ -44,6 +45,7 @@ properties:
>>      enum:
>>        - adi,ad4111
>>        - adi,ad4112
>> +      - adi,ad4113
>>        - adi,ad4114
>>        - adi,ad4115
>>        - adi,ad4116
>> @@ -331,6 +333,7 @@ allOf:
>>              enum:
>>                - adi,ad4111
>>                - adi,ad4112
>> +              - adi,ad4113
>>                - adi,ad4114
>>                - adi,ad4115
>>                - adi,ad4116
>>
>> -- 
>> 2.43.0
>>
>>


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

* Re: [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 14:30   ` Christophe JAILLET
@ 2024-08-09 14:40     ` Ceclan, Dumitru
  2024-08-09 15:34       ` Christophe JAILLET
  0 siblings, 1 reply; 13+ messages in thread
From: Ceclan, Dumitru @ 2024-08-09 14:40 UTC (permalink / raw)
  To: Christophe JAILLET, devnull+dumitru.ceclan.analog.com
  Cc: Michael.Hennerich, conor+dt, devicetree, dumitru.ceclan, jic23,
	krzk+dt, lars, linux-iio, linux-kernel, robh

On 09/08/2024 17:30, Christophe JAILLET wrote:
> Le 09/08/2024 à 12:33, Dumitru Ceclan via B4 Relay a écrit :
>> From: Dumitru Ceclan <dumitru.ceclan-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
>>
>> This commit adds support for the AD4113 ADC.
>> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
>> converter (ADC) that integrates an analog front end (AFE) for four
>> fully differential or eight single-ended inputs.
>>
>> Signed-off-by: Dumitru Ceclan <dumitru.ceclan-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
>> ---
>>   drivers/iio/adc/ad7173.c | 36 +++++++++++++++++++++++++++++++++++-
>>   1 file changed, 35 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
>> index a854f2d30174..3ac09d326472 100644
>> --- a/drivers/iio/adc/ad7173.c
>> +++ b/drivers/iio/adc/ad7173.c
>> @@ -3,7 +3,7 @@
>>    * AD717x and AD411x family SPI ADC driver
>>    *
>>    * Supported devices:
>> - *  AD4111/AD4112/AD4114/AD4115/AD4116
>> + *  AD4111/AD4112/AD4113/AD4114/AD4115/AD4116
>>    *  AD7172-2/AD7172-4/AD7173-8/AD7175-2
>>    *  AD7175-8/AD7176-2/AD7177-2
>>    *
>> @@ -84,6 +84,7 @@
>>   #define AD4111_ID            AD7173_ID
>>   #define AD4112_ID            AD7173_ID
>>   #define AD4114_ID            AD7173_ID
>> +#define AD4113_ID            0x31D0
> 
> Nitpick: others are in lowercase --> 0x31d0
> 
>>   #define AD4116_ID            0x34d0
>>   #define AD4115_ID            0x38d0
>>   #define AD7175_8_ID            0x3cd0
> 
> Other than that, is there any reason to have this "random" order for these defines?
> 
> CJ
> 

It's not random, it was requested to order these defines by the ID value:
https://lore.kernel.org/all/CAHp75VcjcgnLkQWim1AVnyeRGFwwKpaWSCvrmqdv41Lx87hMKw@mail.gmail.com/

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

* Re: [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113
  2024-08-09 14:32     ` Ceclan, Dumitru
@ 2024-08-09 15:09       ` Conor Dooley
  2024-08-17 10:12         ` Jonathan Cameron
  0 siblings, 1 reply; 13+ messages in thread
From: Conor Dooley @ 2024-08-09 15:09 UTC (permalink / raw)
  To: Ceclan, Dumitru
  Cc: dumitru.ceclan, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-iio, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]

On Fri, Aug 09, 2024 at 05:32:08PM +0300, Ceclan, Dumitru wrote:
> On 09/08/2024 17:21, Conor Dooley wrote:
> > On Fri, Aug 09, 2024 at 01:33:24PM +0300, Dumitru Ceclan via B4 Relay wrote:
> >> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
> >>
> >> This commit adds bindings support for AD4113.
> >>
> >> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
> >> converter (ADC) that integrates an analog front end (AFE) for four
> >> fully differential or eight single-ended inputs.
> >>
> >> Added ad4113 to the compatible list and the "avdd2-supply: false"
> >> restriction.
> >>
> >> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
> >> ---
> >>  Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> >> index 17c5d39cc2c1..ad15cf9bc2ff 100644
> >> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> >> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> >> @@ -28,6 +28,7 @@ description: |
> >>    Datasheets for supported chips:
> >>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
> >>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
> >> +    <AD4113: not released yet>
> > 
> > Am I meant to ack it with this placeholder? When will the document be
> > released?
> > Acked-by: Conor Dooley <conor.dooley@microchip.com>
> > 
> Not really sure tbh, up to you. The document will be released in the upcoming months.
> 
> If it's considered best to wait until the docs are public and send another
> version with the correct link. 
> If not, and maintainers consider that these changes can be accepted even
> without viewing the datasheet, I'll send a patch when it goes public.

I don't really care, it's just to Jonathan I think. I'm happy enough
with you adding it when it is released.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 2/2] iio: adc: ad7173: add support for ad4113
  2024-08-09 14:40     ` Ceclan, Dumitru
@ 2024-08-09 15:34       ` Christophe JAILLET
  0 siblings, 0 replies; 13+ messages in thread
From: Christophe JAILLET @ 2024-08-09 15:34 UTC (permalink / raw)
  To: mitrutzceclan
  Cc: Michael.Hennerich, christophe.jaillet, conor+dt, devicetree,
	devnull+dumitru.ceclan.analog.com, dumitru.ceclan, jic23, krzk+dt,
	lars, linux-iio, linux-kernel, robh

Le 09/08/2024 à 16:40, Ceclan, Dumitru a écrit :
> On 09/08/2024 17:30, Christophe JAILLET wrote:
>> Le 09/08/2024 à 12:33, Dumitru Ceclan via B4 Relay a écrit :
>>> From: Dumitru Ceclan <dumitru.ceclan-OyLXuOCK7orQT0dZR+AlfA-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org>
>>>
>>> This commit adds support for the AD4113 ADC.
>>> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
>>> converter (ADC) that integrates an analog front end (AFE) for four
>>> fully differential or eight single-ended inputs.
>>>
>>> Signed-off-by: Dumitru Ceclan <dumitru.ceclan-OyLXuOCK7orQT0dZR+AlfA-XMD5yJDbdMReXY1tMh2IBg@public.gmane.org>
>>> ---
>>>    drivers/iio/adc/ad7173.c | 36 +++++++++++++++++++++++++++++++++++-
>>>    1 file changed, 35 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
>>> index a854f2d30174..3ac09d326472 100644
>>> --- a/drivers/iio/adc/ad7173.c
>>> +++ b/drivers/iio/adc/ad7173.c
>>> @@ -3,7 +3,7 @@
>>>     * AD717x and AD411x family SPI ADC driver
>>>     *
>>>     * Supported devices:
>>> - *  AD4111/AD4112/AD4114/AD4115/AD4116
>>> + *  AD4111/AD4112/AD4113/AD4114/AD4115/AD4116
>>>     *  AD7172-2/AD7172-4/AD7173-8/AD7175-2
>>>     *  AD7175-8/AD7176-2/AD7177-2
>>>     *
>>> @@ -84,6 +84,7 @@
>>>    #define AD4111_ID            AD7173_ID
>>>    #define AD4112_ID            AD7173_ID
>>>    #define AD4114_ID            AD7173_ID
>>> +#define AD4113_ID            0x31D0
>>
>> Nitpick: others are in lowercase --> 0x31d0
>>
>>>    #define AD4116_ID            0x34d0
>>>    #define AD4115_ID            0x38d0
>>>    #define AD7175_8_ID            0x3cd0
>>
>> Other than that, is there any reason to have this "random" order for these defines?
>>
>> CJ
>>
> 
> It's not random, it was requested to order these defines by the ID value:
> https://lore.kernel.org/all/CAHp75VcjcgnLkQWim1AVnyeRGFwwKpaWSCvrmqdv41Lx87hMKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org/
> 

Ok,

I thought about it, but it is not sorted either. (a few lines above the 
place you added the new #define):

#define AD7175_ID			0x0cd0
#define AD7176_ID			0x0c90

Maybe, it should be part of another patch to keep the logic by ID value?

CJ

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

* Re: [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113
  2024-08-09 15:09       ` Conor Dooley
@ 2024-08-17 10:12         ` Jonathan Cameron
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Cameron @ 2024-08-17 10:12 UTC (permalink / raw)
  To: Conor Dooley
  Cc: Ceclan, Dumitru, dumitru.ceclan, Lars-Peter Clausen,
	Michael Hennerich, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-iio, devicetree, linux-kernel

On Fri, 9 Aug 2024 16:09:07 +0100
Conor Dooley <conor@kernel.org> wrote:

> On Fri, Aug 09, 2024 at 05:32:08PM +0300, Ceclan, Dumitru wrote:
> > On 09/08/2024 17:21, Conor Dooley wrote:  
> > > On Fri, Aug 09, 2024 at 01:33:24PM +0300, Dumitru Ceclan via B4 Relay wrote:  
> > >> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
> > >>
> > >> This commit adds bindings support for AD4113.
> > >>
> > >> The AD4113 is a low power, low noise, 16-bit, Σ-Δ analog-to-digital
> > >> converter (ADC) that integrates an analog front end (AFE) for four
> > >> fully differential or eight single-ended inputs.
> > >>
> > >> Added ad4113 to the compatible list and the "avdd2-supply: false"
> > >> restriction.
> > >>
> > >> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
> > >> ---
> > >>  Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml | 3 +++
> > >>  1 file changed, 3 insertions(+)
> > >>
> > >> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> > >> index 17c5d39cc2c1..ad15cf9bc2ff 100644
> > >> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> > >> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
> > >> @@ -28,6 +28,7 @@ description: |
> > >>    Datasheets for supported chips:
> > >>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4111.pdf
> > >>      https://www.analog.com/media/en/technical-documentation/data-sheets/AD4112.pdf
> > >> +    <AD4113: not released yet>  
> > > 
> > > Am I meant to ack it with this placeholder? When will the document be
> > > released?
> > > Acked-by: Conor Dooley <conor.dooley@microchip.com>
> > >   
> > Not really sure tbh, up to you. The document will be released in the upcoming months.
> > 
> > If it's considered best to wait until the docs are public and send another
> > version with the correct link. 
> > If not, and maintainers consider that these changes can be accepted even
> > without viewing the datasheet, I'll send a patch when it goes public.  
> 
> I don't really care, it's just to Jonathan I think. I'm happy enough
> with you adding it when it is released.

Given some companies never release public docs (mine for example rarely does)
there is no requirement for datasheets. So this is fine, particularly if you
come back with a link when it is available.

Thanks,

Jonathan


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

end of thread, other threads:[~2024-08-17 10:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-09 10:33 [PATCH v2 0/2] Add support for AD4113 Dumitru Ceclan via B4 Relay
2024-08-09 10:33 ` [PATCH v2 1/2] dt-bindings: adc: ad7173: add support for ad4113 Dumitru Ceclan via B4 Relay
2024-08-09 14:21   ` Conor Dooley
2024-08-09 14:32     ` Ceclan, Dumitru
2024-08-09 15:09       ` Conor Dooley
2024-08-17 10:12         ` Jonathan Cameron
2024-08-09 10:33 ` [PATCH v2 2/2] iio: " Dumitru Ceclan via B4 Relay
2024-08-09 12:26   ` Nuno Sá
2024-08-09 12:32     ` Ceclan, Dumitru
2024-08-09 14:12       ` Nuno Sá
2024-08-09 14:30   ` Christophe JAILLET
2024-08-09 14:40     ` Ceclan, Dumitru
2024-08-09 15:34       ` Christophe JAILLET

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).