dt-bindings: iio: adc: add max14001
Marilene Andrade Garcia
maintainerPATCH v13 1/2 dt-bindings: iio: adc: add max14001
Add device-tree documentation for MAX14001/MAX14002 ADCs. The MAX14001/MAX14002 are isolated, single-channel analog-to-digital converters with programmable voltage comparators and inrush current control optimized for configurable binary input applications.
They share the same features, but in the MAX14001 the inrush trigger threshold, current magnitude, and current duration are all programmable, whereas in the MAX14002 these parameters are fixed.
---
Hello maintainers,
Thank you for reviewing v12.
I believe I’ve addressed the requested code changes.
Best regards,
Marilene Andrade Garcia
.../bindings/iio/adc/adi,max14001.yaml | 89 +++++++++++++++++++ MAINTAINERS | 8 ++ 2 files changed, 97 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml
Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml new file +89 -0
@@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2023-2025 Analog Devices Inc. +# Copyright 2023 Kim Seer Paller +# Copyright 2025 Marilene Andrade Garcia +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,max14001.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices MAX14001-MAX14002 ADC + +maintainers: + - Kim Seer Paller <[email protected]> + - Marilene Andrade Garcia <[email protected]> + +description: | + Single channel 10 bit ADC with SPI interface. + Datasheet can be found here + https://www.analog.com/media/en/technical-documentation/data-sheets/MAX14001-MAX14002.pdf + +$ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + oneOf: + - const: adi,max14002 + - items: + - const: adi,max14001 + - const: adi,max14002 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 5000000 + + vdd-supply: + description: + Isolated DC-DC power supply input voltage. + + vddl-supply: + description: + Logic power supply. + + refin-supply: + description: + ADC voltage reference supply. + + interrupts: + minItems: 1 + items: + - description: | + cout: comparator output signal that asserts high on the COUT pin + when ADC readings exceed the upper threshold and low when readings + fall below the lower threshold. + - description: | + fault: when fault reporting is enabled, the FAULT pin is asserted + low whenever one of the monitored fault conditions occurs. + + interrupt-names: + minItems: 1 + items: + - const: cout + - const: fault + +required: + - compatible + - reg + - vdd-supply + - vddl-supply + +unevaluatedProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,max14001", "adi,max14002"; + reg = <0>; + spi-max-frequency = <5000000>; + spi-lsb-first; + vdd-supply = <&vdd>; + vddl-supply = <&vddl>; + }; + }; +...
MAINTAINERS +8 -0
@@ -15174,6 +15174,14 @@ S: Orphan F: drivers/video/fbdev/matrox/matroxfb_* F: include/uapi/linux/matroxfb.h +MAX14001/MAX14002 IIO ADC DRIVER +M: Kim Seer Paller <[email protected]> +M: Marilene Andrade Garcia <[email protected]> +L: [email protected] +S: Maintained +W: https://ez.analog.com/linux-software-drivers +F: Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml + MAX15301 DRIVER M: Daniel Nilsson <[email protected]> L: [email protected]
base-commit: 4b17a60d1e1c2d9d2ccbd58642f6f4ac2fa364ba
Signature · 1 line
2.34.1
Marilene Andrade Garcia
maintainerPATCH v13 2/2 iio: adc: max14001: New driver
The MAX14001/MAX14002 is configurable, isolated 10-bit ADCs for multi-range binary inputs. In addition to ADC readings, the MAX14001/MAX14002 offers more features, like a binary comparator, a filtered reading that can provide the average of the last 2, 4, or 8 ADC readings, and an inrush comparator that triggers the inrush current. There is also a fault feature that can diagnose seven possible fault conditions. And an option to select an external or internal ADC voltage reference.
MAX14001/MAX14002 features implemented so far:
- Raw ADC reading.
- MV fault disable.
- Selection of external or internal ADC voltage reference, depending on whether it is declared in the device tree.
---
Hello maintainers,
Thank you for reviewing v12.
I believe I have addressed the requested code changes.
As discussed, I have dropped the averaging feature from this series and I am going to add it in a later series. Also, because of that, I am not going to send the patch related to the in_voltageY_mean_raw ABI documentation change, but I did take notes about your suggestion in my v12 version patch related to that, David, thanks.
As I said before, I intend to continue sending patches to implement all the features of the device. It will be at a low frequency, but consistently.
Thank you, Marcelo, for the code example and for testing on your end as well. In my tests, I also got 0x80 from the FLAGS (0x02) register. I thought it could be because I am using low voltage as power input, as I am using the 5V provided by the Raspberry Pi. As soon as I get a proper power supply, I am going to investigate that.
Notes:
I have returned the st->chip_info null check as requested in the v12 reviews, even though I had dropped it because of a suggestion in v11.
Best regards,
Marilene Andrade Garcia
MAINTAINERS | 1 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/max14001.c | 391 +++++++++++++++++++++++++++++++++++++ 4 files changed, 403 insertions(+) create mode 100644 drivers/iio/adc/max14001.c
MAINTAINERS +1 -0
@@ -15181,6 +15181,7 @@ L: [email protected] S: Maintained W: https://ez.analog.com/linux-software-drivers F: Documentation/devicetree/bindings/iio/adc/adi,max14001.yaml +F: drivers/iio/adc/max14001.c MAX15301 DRIVER M: Daniel Nilsson <[email protected]>
drivers/iio/adc/Kconfig +10 -0
@@ -1020,6 +1020,16 @@ config MAX1363 To compile this driver as a module, choose M here: the module will be called max1363. +config MAX14001 + tristate "Analog Devices MAX14001/MAX14002 ADC driver" + depends on SPI + help + Say yes here to build support for Analog Devices MAX14001/MAX14002 + Configurable, Isolated 10-bit ADCs for Multi-Range Binary Inputs. + + To compile this driver as a module, choose M here: the module will be + called max14001. + config MAX34408 tristate "Maxim max34408/max344089 ADC driver" depends on I2C
drivers/iio/adc/Makefile +1 -0
@@ -89,6 +89,7 @@ obj-$(CONFIG_MAX11205) += max11205.o obj-$(CONFIG_MAX11410) += max11410.o obj-$(CONFIG_MAX1241) += max1241.o obj-$(CONFIG_MAX1363) += max1363.o +obj-$(CONFIG_MAX14001) += max14001.o obj-$(CONFIG_MAX34408) += max34408.o obj-$(CONFIG_MAX77541_ADC) += max77541-adc.o obj-$(CONFIG_MAX9611) += max9611.o
drivers/iio/adc/max14001.c new file +391 -0
391 lines not on this page · raw message
Signature · 1 line
2.34.1
Re: [PATCH v13 2/2] iio: adc: max14001: New driver
Quoted 14 lines · Marilene Andrade Garcia
The MAX14001/MAX14002 is configurable, isolated 10-bit ADCs for multi-range binary inputs. In addition to ADC readings, the MAX14001/MAX14002 offers more features, like a binary comparator, a filtered reading that can provide the average of the last 2, 4, or 8 ADC readings, and an inrush comparator that triggers the inrush current. There is also a fault feature that can diagnose seven possible fault conditions. And an option to select an external or internal ADC voltage reference.
MAX14001/MAX14002 features implemented so far:
- Raw ADC reading.
- MV fault disable.
- Selection of external or internal ADC voltage reference, depending on whether it is declared in the device tree.
Quoted 5 lines
Co-developed-by Kim Seer Paller <[email protected]>Signed-off-by Kim Seer Paller <[email protected]>Signed-off-by Marilene Andrade Garcia <[email protected]>Tested-by Marcelo Schmitt <[email protected]>---
Hmm, I don't know why, but I would have given a different order to the tags
Reviewed-by: M. S. <...> # new tag
Tested-by: M. S. <...>
Co-developed-by: K. S. P. <...>
Signed-off-by: K. S. P. <...>
Signed-off-by: M. A. G. <...>
Swapping tag lines will probably not be a reason for a v14, though.
Cheers,
Marcelo
Jonathan Cameron
maintainerRe: [PATCH v13 2/2] iio: adc: max14001: New driver
Quoted 22 lines · On Thu, 16 Oct 2025 23:09:31 -0300 Marcelo Schmitt…
Quoted 14 lines · Marilene Andrade Garcia
The MAX14001/MAX14002 is configurable, isolated 10-bit ADCs for multi-range binary inputs. In addition to ADC readings, the MAX14001/MAX14002 offers more features, like a binary comparator, a filtered reading that can provide the average of the last 2, 4, or 8 ADC readings, and an inrush comparator that triggers the inrush current. There is also a fault feature that can diagnose seven possible fault conditions. And an option to select an external or internal ADC voltage reference.
MAX14001/MAX14002 features implemented so far:
- Raw ADC reading.
- MV fault disable.
- Selection of external or internal ADC voltage reference, depending on whether it is declared in the device tree.Quoted 5 lines
Co-developed-by Kim Seer Paller <[email protected]>Signed-off-by Kim Seer Paller <[email protected]>Signed-off-by Marilene Andrade Garcia <[email protected]>Tested-by Marcelo Schmitt <[email protected]>---
Reviewed-by Marcelo Schmitt <[email protected]>
Quoted 8 lines
Hmm, I don't know why, but I would have given a different order to the tags
Reviewed-by: M. S. <...> # new tag
Tested-by: M. S. <...>
Co-developed-by: K. S. P. <...>
Signed-off-by: K. S. P. <...>
Signed-off-by: M. A. G. <...>Swapping tag lines will probably not be a reason for a v14, though.
There have been many debates on this but no clear rules wrt to whether review / testing tags should go earlier (on basis the sign off occurs after them if they were on a previous version) or just put them all at the end.
Meh. All the right info is here so I'll just leave it be.
Series applied to the togreg branch of iio.git. Initially pushed out as testing to let the autobuilders play with it.
Thanks,
Jonathan
Quoted 3 lines
Cheers,
Marcelo
Quoted 5 lines · Marilene Andrade Garcia
Add device-tree documentation for MAX14001/MAX14002 ADCs. The MAX14001/MAX14002 are isolated, single-channel analog-to-digital converters with programmable voltage comparators and inrush current control optimized for configurable binary input applications.
Quoted 8 lines
They share the same features, but in the MAX14001 the inrush trigger threshold, current magnitude, and current duration are all programmable, whereas in the MAX14002 these parameters are fixed.
Co-developed-by Kim Seer Paller <[email protected]>Signed-off-by Kim Seer Paller <[email protected]>Signed-off-by Marilene Andrade Garcia <[email protected]>---
Since you've dropped the ADC node label, I think you could have picked up Conor's review tag from v12.
If nothing else comes up, you won't need to send a v14 as Jonathan will probably pick the latest tags when applying the patches.
Cheers,
Marcelo
Marilene Andrade Garcia
maintainerQuoted 16 lines · Marcelo Schmitt
Quoted 5 lines · Marilene Andrade Garcia
Add device-tree documentation for MAX14001/MAX14002 ADCs. The MAX14001/MAX14002 are isolated, single-channel analog-to-digital converters with programmable voltage comparators and inrush current control optimized for configurable binary input applications.
Quoted 8 lines
They share the same features, but in the MAX14001 the inrush trigger threshold, current magnitude, and current duration are all programmable, whereas in the MAX14002 these parameters are fixed.
Co-developed-by Kim Seer Paller <[email protected]>Signed-off-by Kim Seer Paller <[email protected]>Signed-off-by Marilene Andrade Garcia <[email protected]>---
Reviewed-by Marcelo Schmitt <[email protected]>
Quoted 8 lines
Since you've dropped the ADC node label, I think you could have picked up Conor's review tag from v12.
If nothing else comes up, you won't need to send a v14 as Jonathan will probably pick the latest tags when applying the patches.
Cheers,
Marcelo
I agree, I forgot to pick up Conor's review tag. Sorry about that. Okay, thank you.
Best regards,
Marilene
Quoted 12 lines
Quoted 12 lines
Quoted 4 lines
Co-developed-by Kim Seer Paller <[email protected]>Signed-off-by Kim Seer Paller <[email protected]>Signed-off-by Marilene Andrade Garcia <[email protected]>---
Reviewed-by Marcelo Schmitt <[email protected]>Since you've dropped the ADC node label, I think you could have picked up Conor's review tag from v12.
If nothing else comes up, you won't need to send a v14 as Jonathan will probably pick the latest tags when applying the patches.
Quoted 8 lines
Quoted 2 lines
Cheers,
MarceloI agree, I forgot to pick up Conor's review tag. Sorry about that. Okay, thank you.
Best regards,
Marilene
Hello maintainers,
Just checking, is there any other action I should take on my end regarding this patch series?
Jonathan, I forgot to add the following tag in v13, so I was wondering if you could please include it when applying the patch.
Thank you so much for all your assistance.
Best regards,
Marilene
Quoted 23 lines · On Sun, 19 Oct 2025 15:02:54 -0300 Marilene Andrade Garcia…
Quoted 13 lines
Quoted 13 lines
Quoted 4 lines
Co-developed-by Kim Seer Paller <[email protected]>Signed-off-by Kim Seer Paller <[email protected]>Signed-off-by Marilene Andrade Garcia <[email protected]>---
Reviewed-by Marcelo Schmitt <[email protected]>Since you've dropped the ADC node label, I think you could have picked up Conor's review tag from v12.
If nothing else comes up, you won't need to send a v14 as Jonathan will probably
pick the latest tags when applying the patches.Quoted 8 lines
Quoted 2 lines
Cheers,
MarceloI agree, I forgot to pick up Conor's review tag. Sorry about that. Okay, thank you.
Best regards,
Marilene
Quoted 7 lines
Hello maintainers,
Just checking, is there any other action I should take on my end regarding this patch series?
Jonathan, I forgot to add the following tag in v13, so I was wondering if you could please include it when applying the patch.Reviewed-by Conor Dooley <[email protected]>
I replied to patch 2 to say I've picked the whole series up.
Fixed this up and pushed out. So you should see the result on git.kernel.org iio.git togreg
J
Quoted 5 lines
Thank you so much for all your assistance.
Best regards,
Marilene