[PATCH v1 1/2] dt-bindings: iio: adc: Add device tree binding for MAX22531 ADC

Abhinav Jain posted 2 patches 1 month, 1 week ago
[PATCH v1 1/2] dt-bindings: iio: adc: Add device tree binding for MAX22531 ADC
Posted by Abhinav Jain 1 month, 1 week ago
Add device tree documentation for MAX22530-MAX22532 family of ADCs.
The MAX22530–MAX22532 are galvanically isolated, 4-channel, multiplexed,
12-bit, analog-to-digital converters (ADC) in the MAXSafe™ family product
line. An integrated, isolated, DC-DC converter powers all fieldside
circuitry, and this allows field-side diagnostics even when no input
signal is present.

Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
---
 .../bindings/iio/adc/adi,max22531.yaml        | 75 +++++++++++++++++++
 MAINTAINERS                                   |  7 ++
 2 files changed, 82 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml b/Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml
new file mode 100644
index 000000000000..16bf4a1d0926
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2025 Abhinav Jain
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,max22531.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices MAX22530-MAX22532 12-bit Field Isolated ADCs
+
+maintainers:
+  - Abhinav Jain <jain.abhinav177@gmail.com>
+
+description:
+  Bindings for the Analog Devices Max22530-MAX22532 Field-Side Self-Powered,
+  4-Channel, 12-bit, Isolated ADCs.
+
+  Datasheet can be found here
+    https://www.analog.com/media/en/technical-documentation/data-sheets/max22530-max22532.pdf
+
+$ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+  compatible:
+    enum:
+      - adi,max22530
+      - adi,max22531
+      - adi,max22532
+
+  reg:
+    maxItems: 1
+
+  spi-max-frequency:
+    maximum: 10000000
+    description: Maximum SPI frequency (Hz)
+
+  vddl-supply:
+    description:
+      Logic power supply.
+
+  vddpl-supply:
+    description:
+      Isolated DC-DC converter power supply.
+
+  interrupts:
+    items:
+      - description: |
+          Interrupt for signaling when conversion results exceed the upper
+          threshold for ADC readings or fall below the lower threshold. The
+          interrupt source must be attached to one of COUT1 to COUT4 pins.
+      - description: |
+          Alert output that asserts low during a number of different error
+          conditions. The interrupt source must be attached to INT pin.
+
+required:
+  - compatible
+  - reg
+  - vddl-supply
+  - vddpl-supply
+
+additionalProperties: false
+
+examples:
+  - |
+    spi {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      max22531: adc@0 {
+        compatible = "adi,max22531";
+        reg = <0>;
+        spi-max-frequency = <5000000>;
+        vddl-supply = <&vddl>;
+        vddpl-supply = <&vddpl>;
+      };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index a92290fffa16..6f26db9cf742 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14702,6 +14702,13 @@ F:	Documentation/userspace-api/media/drivers/max2175.rst
 F:	drivers/media/i2c/max2175*
 F:	include/uapi/linux/max2175.h
 
+MAX22531 ADC DRIVER
+M:	Abhinav Jain <jain.abhinav177@gmail.com>
+L:	linux-iio@vger.kernel.org
+S:	Maintained
+W:	https://ez.analog.com/linux-software-drivers
+F:	Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml
+
 MAX31335 RTC DRIVER
 M:	Antoniu Miclaus <antoniu.miclaus@analog.com>
 L:	linux-rtc@vger.kernel.org
-- 
2.34.1

Re: [PATCH v1 1/2] dt-bindings: iio: adc: Add device tree binding for MAX22531 ADC
Posted by Krzysztof Kozlowski 1 month ago
On 25/08/2025 23:25, Abhinav Jain wrote:
> Add device tree documentation for MAX22530-MAX22532 family of ADCs.
> The MAX22530–MAX22532 are galvanically isolated, 4-channel, multiplexed,
> 12-bit, analog-to-digital converters (ADC) in the MAXSafe™ family product
> line. An integrated, isolated, DC-DC converter powers all fieldside
> circuitry, and this allows field-side diagnostics even when no input
> signal is present.
> 
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>


Please do not develop on old trees. You need to rebase your patchset and
test it on latest mainline kernel.

You CC-ed an address, which suggests you do not work on mainline kernel
or you do not use get_maintainers.pl/b4/patman. Please rebase and always
work on mainline or start using mentioned tools, so correct addresses
will be used.


Best regards,
Krzysztof
Re: [PATCH v1 1/2] dt-bindings: iio: adc: Add device tree binding for MAX22531 ADC
Posted by Conor Dooley 1 month, 1 week ago
On Tue, Aug 26, 2025 at 02:55:24AM +0530, Abhinav Jain wrote:
> Add device tree documentation for MAX22530-MAX22532 family of ADCs.
> The MAX22530–MAX22532 are galvanically isolated, 4-channel, multiplexed,
> 12-bit, analog-to-digital converters (ADC) in the MAXSafe™ family product
> line. An integrated, isolated, DC-DC converter powers all fieldside
> circuitry, and this allows field-side diagnostics even when no input
> signal is present.
> 
> Signed-off-by: Abhinav Jain <jain.abhinav177@gmail.com>
> ---
>  .../bindings/iio/adc/adi,max22531.yaml        | 75 +++++++++++++++++++
>  MAINTAINERS                                   |  7 ++
>  2 files changed, 82 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml b/Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml
> new file mode 100644
> index 000000000000..16bf4a1d0926
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,max22531.yaml
> @@ -0,0 +1,75 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright 2025 Abhinav Jain
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,max22531.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices MAX22530-MAX22532 12-bit Field Isolated ADCs
> +
> +maintainers:
> +  - Abhinav Jain <jain.abhinav177@gmail.com>
> +
> +description:
> +  Bindings for the Analog Devices Max22530-MAX22532 Field-Side Self-Powered,
> +  4-Channel, 12-bit, Isolated ADCs.
> +
> +  Datasheet can be found here
> +    https://www.analog.com/media/en/technical-documentation/data-sheets/max22530-max22532.pdf
> +
> +$ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - adi,max22530
> +      - adi,max22531
> +      - adi,max22532

Generally this looks okay to me, but I would like you to mention what it
is that makes a fallback between these impossible in your commit
message.