Re: [PATCH v3 1/5] dt-bindings: iio: adc: Add ltc2378

From: Conor Dooley

Date: Wed Jun 17 2026 - 12:09:43 EST


On Tue, Jun 16, 2026 at 11:03:11PM -0300, Marcelo Schmitt wrote:
> Document how to describe LTC2378-20 and similar ADCs in device tree.
>
> Signed-off-by: Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> ---
> Change log v2 -> v3:
> - Re-added device tree fallback compatibles for LTC2378 chips, now with options
> to provide a single compatible string or a pair of single compatible string
> plus a fallback string to a slower sample rate spec in case a driver for the
> specific part is not found.
>
> .../bindings/iio/adc/adi,ltc2378.yaml | 160 ++++++++++++++++++
> MAINTAINERS | 7 +
> 2 files changed, 167 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml
> new file mode 100644
> index 000000000000..7d30a2cade8f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ltc2378.yaml
> @@ -0,0 +1,160 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/adi,ltc2378.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Analog Devices LTC2378 and similar Analog to Digital Converters
> +
> +maintainers:
> + - Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>
> +
> +description: |
> + Analog Devices LTC2378 series of ADCs.
> + Specifications can be found at:
> + https://www.analog.com/media/en/technical-documentation/data-sheets/233818fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236416fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236418f.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236716fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236718f.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236816f.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236818f.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/236918fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237016fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237616fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237618fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237620fb.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237716fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237718fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237720fb.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237816fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237818fa.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237820fb.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/237918fb.pdf
> + https://www.analog.com/media/en/technical-documentation/data-sheets/238016fb.pdf
> +
> +$ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
> + # Single compatible string match.
> + - enum:
> + - adi,ltc2338-18
> + - adi,ltc2364-16
> + - adi,ltc2364-18
> + - adi,ltc2367-16
> + - adi,ltc2367-18
> + - adi,ltc2368-16
> + - adi,ltc2368-18
> + - adi,ltc2369-18
> + - adi,ltc2370-16
> + - adi,ltc2376-16
> + - adi,ltc2376-18
> + - adi,ltc2376-20
> + - adi,ltc2377-16
> + - adi,ltc2377-18
> + - adi,ltc2377-20
> + - adi,ltc2378-16
> + - adi,ltc2378-18
> + - adi,ltc2378-20
> + - adi,ltc2379-18
> + - adi,ltc2380-16
> +
> + # Low sample rate fallback for 16-bit unipolar sensors.
> + - items:
> + - enum:
> + - adi,ltc2370-16 # 2 MSPS
> + - adi,ltc2368-16 # 1 MSPS
> + - adi,ltc2367-16 # 500 kSPS
> + - const: adi,ltc2364-16 # fallback (250 kSPS)

Your driver still matches on ltc2370-16, which makes me question the
value of these fallbacks. That said, the chip info struct contains no
information about sampling rate. What actually is the impact of the
sample rate on the programming model?
Is there actually a benefit to matching on ltc2370-16, or can you just
match on the fallback?
+static const struct ltc2378_chip_info ltc2370_16_chip_info = {
+ .name = "ltc2370-16",
+ .resolution = 16,
+ .bipolar = false,
+};

+static const struct ltc2378_chip_info ltc2368_16_chip_info = {
+ .name = "ltc2368-16",
+ .resolution = 16,
+ .bipolar = false,
+};

+static const struct ltc2378_chip_info ltc2367_16_chip_info = {
+ .name = "ltc2367-16",
+ .resolution = 16,
+ .bipolar = false,
+};

+static const struct ltc2378_chip_info ltc2364_16_chip_info = {
+ .name = "ltc2364-16",
+ .resolution = 16,
+ .bipolar = false,
+};

All the devices have the same match data, other than the name, as the
fallback.

> +
> + # Low sample rate fallback for 18-bit unipolar sensors.
> + - items:
> + - enum:
> + - adi,ltc2369-18 # 1.6 MSPS
> + - adi,ltc2368-18 # 1 MSPS
> + - adi,ltc2367-18 # 500 kSPS
> + - const: adi,ltc2364-18 # fallback (250 kSPS)
> +
> + # Low sample rate fallback for 16-bit bipolar sensors.
> + - items:
> + - enum:
> + - adi,ltc2380-16 # 2 MSPS
> + - adi,ltc2378-16 # 1 MSPS
> + - adi,ltc2377-16 # 500 kSPS
> + - const: adi,ltc2376-16 # fallback (250 kSPS)
> +
> + # Low sample rate fallback for 18-bit bipolar sensors.
> + - items:
> + - enum:
> + - adi,ltc2379-18 # 1.6 MSPS
> + - adi,ltc2338-18 # 1 MSPS
> + - adi,ltc2378-18 # 1 MSPS
> + - adi,ltc2377-18 # 500 kSPS
> + - const: adi,ltc2376-18 # fallback (250 kSPS)
> +
> + # Low sample rate fallback for 20-bit bipolar sensors.
> + - items:
> + - enum:
> + - adi,ltc2378-20 # 1 MSPS
> + - adi,ltc2377-20 # 500 kSPS
> + - const: adi,ltc2376-20 # fallback (250 kSPS)

I didn't check these, but I assume they are the same.

Attachment: signature.asc
Description: PGP signature