From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A9B33911C5 for ; Fri, 12 Jun 2026 17:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781284045; cv=none; b=gPR4ltE/93YN8whkLdBHTEJQtxUymSbynBdCGRIeOMfZmnMt7aYLzi/7xv/IOx+aErx75w9N5HDcAxqXhZBcbbdioIX3uQObHYTOjaF8No0IheBYWPcjR0Qla3/AZYuvwoynHgDr0vgmhzIYIdoDdiZk5/c6f+N5r0U8hSpnp0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781284045; c=relaxed/simple; bh=s8kIyI8Kg8mw2/G73/sI5WPB5OMwNe7xM80CIqvV0jA=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=GwFb+eEUxeRvCKXCB9MrjScmfZxq26BpTu2ukO2loWRsgAf3jAOudOvP+iLbFBQEw6Ko6Rlv9/j1ii5P5douTRwrns+Tu3O3Z2D7sp+8kWzWAQSWnzpIO0CIf7NyZsPyeMVSV9cb7QgU3WTzkF6YfODD1+cK62CNLHksgbCtal4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=YGEDnQQU; arc=none smtp.client-ip=209.85.167.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="YGEDnQQU" Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-4871618372cso903256b6e.3 for ; Fri, 12 Jun 2026 10:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1781284042; x=1781888842; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=xKBQNOcRDd3e+ERR3iAVHd2ZwLSI7ZZFaqAB8m1VpdM=; b=YGEDnQQU0Z8Dh39IITsQxB7QhrG51FX9zkqfdX0w0wXn69gdNM9U0SI7SkAkKafdwm 4YXkvTCg/LbbGl+/ljjB7d+LQrdvumzaEx+HkaRiu/HAsiUERgQpHED5a6fvr50V8vm6 Be9fv2Pn+ZyyDCsE1fHMb/RK13f6g9GkgBvfaFmYxIasBLI4T6rXDHnXnrs6v8c2+kri QIlV52kcKtqa5FRMvDcaIIdTS6VeTNu81dUhyi9P00isWYsvoCKR8RgHPZAz/BDomHlB +ISRJo1hKO6VV2/DWhYf5puP6qt0WUP7bZgdLwOYULhs9lYxLRlTj+M5/7rz8tyIjAA+ mJ7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781284042; x=1781888842; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xKBQNOcRDd3e+ERR3iAVHd2ZwLSI7ZZFaqAB8m1VpdM=; b=mrH/tdTka/yfzUBoeC4ki+tnbe4tVjhe+bMfbhCAfUCilvQ96eSPwzYeri+r8c88cu P0TVr2kBAbzHQoGmZglu8hqJuneSuHFP8Xq4c6vOkNjT+PUzf7NZQ9bycCoxa5FmhdJd HO3uFrkAb1Vi5ilLOiCYLJz9Q/aMVI8dJh1AFT/JwWK3YeNq+dGXPFNsOeoZ7y/eHo5z WL60CuYHUqUu8BlemcQk9YBPq0AXC3svQfScOv0Tu13GtYMFrRfylKNofJtqfJu++zGl MJjDK2iMlQn6lAvvU3kT9VzJMWDfXZAh9bW3ZppqW9XSNxj2aiSP20dHKpCBVhL0NbX1 a1mg== X-Forwarded-Encrypted: i=1; AFNElJ+KN9ptl2zzEUruGjfozReec9pubBZQS66uZWR1pwb7u5o7kS9Wnzd1WyIWPzbG+63SdyQdm93WO1HlSwQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwUdhvcEQq2/qqo7F4dV0WpjbHHw7wj1V/QvYscKjBR/rvGnd4J fELu4HkesUACKt8PTefF1qNPlFouPAOBkfafoeNwmOQjelemZXg4JqmuxJnbLQmalW8= X-Gm-Gg: Acq92OEakg5DRf3qW6+7Bd1afRcNPJI9P0auRh4//eUpJ1/hrw4fO6Qo21k7zZsInJT 8EmNqENLMbV9lEN1N5kdC/5CwGNtzeqbaCCZGLcOqq0vfoM1OxfSnMgsPmhXX6oKf1tMKM60tfo DMSY/5KzL1Q1efPG2PE4Ka70gBz8a/xXor+WU9SdmkNENhb47ChAictczXBCXPo7ZOmfLXpM6vv TTV/X8DwusPZM3gabcn0ndY0ro4SBbk35n1P6FDTHov0Tg5iTvCUoQgNmt1kdTov2rsemOQhkpV WsjzGgCm3slenrWcSq+cQUYZworn8eU64JQHbk6xGn4n/839pMctGxfOXf3M9+IGRqNeaZUBHVZ 8Grjaz9aRiyWHG9Q5nW7XItfpEpM2MPf+7qzNHyDxP5cvpeJUIhA3/MTN6Rytcxv60aVg+VkodH w9t+UAAn2nFIY9YPqg9bpphOgS2DYaRXkYWTIF3hYaQKpeMOouSseSyxBK5XdCiM57Atmg0vSbc 0wEAUAooQ== X-Received: by 2002:a05:6808:6f8e:b0:486:4f16:796c with SMTP id 5614622812f47-4872f55c651mr2546586b6e.33.1781284042259; Fri, 12 Jun 2026 10:07:22 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:cba0:23d4:353:6048? ([2600:8803:e7e4:500:cba0:23d4:353:6048]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4873158579csm1336573b6e.14.2026.06.12.10.07.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Jun 2026 10:07:21 -0700 (PDT) Message-ID: Date: Fri, 12 Jun 2026 12:07:20 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: Add TI ADS1220 From: David Lechner To: Nguyen Minh Tien , Jonathan Cameron Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , linux-kernel@vger.kernel.org References: <20260610151342.44274-1-zizuzacker@gmail.com> <20260610151342.44274-2-zizuzacker@gmail.com> <788b7c6f-fae8-47cd-b78a-33f2803d8c88@baylibre.com> Content-Language: en-US In-Reply-To: <788b7c6f-fae8-47cd-b78a-33f2803d8c88@baylibre.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/12/26 11:10 AM, David Lechner wrote: > On 6/10/26 10:13 AM, Nguyen Minh Tien wrote: >> The ADS1220 is a 24-bit, 2-kSPS, 4-channel delta-sigma ADC from Texas >> Instruments with an SPI (mode 1) interface, a programmable gain amplifier, >> an internal 2.048V reference and a dedicated DRDY data-ready output. >> ... >> +patternProperties: >> + "^channel@[0-6]$": >> + $ref: adc.yaml >> + type: object >> + description: Represents one ADC input configuration (channel). >> + >> + properties: >> + reg: >> + minimum: 0 >> + maximum: 6 > > I would add a comment explaining that the limit here is arbitrary. Also wouldn't > hurt to make it a bit bigger. Technically, someone could have every possible > combination of all inputs (16 differential + 4 single-ended). >From the dataheet, it looks like there are 12 possible valid channel settings rather than 7. > >> + >> + diff-channels: >> + description: >> + Differential input pair routable by the ADS1220 multiplexer. >> + oneOf: >> + - items: [const: 0, const: 1] >> + - items: [const: 0, const: 2] >> + - items: [const: 0, const: 3] >> + - items: [const: 1, const: 2] >> + - items: [const: 1, const: 3] >> + - items: [const: 2, const: 3] >> + - items: [const: 1, const: 0] >> + - items: [const: 3, const: 2] > > Sometimes, the same channel may be used as both positive and negative > for a diagnostic, so I would just allow any combination instead of > listing specific combinations. > And now that I read the datasheet better, I guess this is fine.