From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (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 40FFA3793BF for ; Fri, 12 Jun 2026 17:07:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781284045; cv=none; b=oj9ClWXHViYQekzzg79X8mJSF3Tc8M+ELHZbcuT3nJFOH06mPo3s66zT1INWOz158VCXyUMi950NzrwhFSM9qlwmAnwSqo/gWjlgPsD9mElhXG2lWw3TNrOSKD6xXajNN9h7WRoKbhUVGGM2nq5rwxBeH3UlNNebwmjQSbc981w= 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.171 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-f171.google.com with SMTP id 5614622812f47-486560db81cso1130707b6e.0 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=BStv9IKgcw5qczvYsE0RMOR/kLG66KSvgAaDtBwxndji6weKIsmMamIMc+337AEl+W 6TnlCzhNWCxSi/ONNz59Qf2/Skrtfm1RNXk6AQw86tDppPrkG/N8Qt6wjqgIPwefGKSq anwO2/tSfsonxTKUfQn646YU4XRmgqntM7Df4l0ADAbLgXADlHwl/wHGbMV6SkgRW+aX uw4i1LKsDrrEWz3ScgWo98lPrtNIN9gb/AmWQbIrHXibYTsni0/5mqEL5y7C0dLTriM3 3hRDHnrdtGu+uDB6TA2bd0NWhtq3jd3TNgs360XFprCO8ya6MpWgs22cc0LIfubFd8Ra UxqA== X-Forwarded-Encrypted: i=1; AFNElJ+pzG/4sYaovWYGgdWRKGRoSgIP82mEfzqR/f44+4JF9yKmNTHsxibg1IkX8xVp66F6HW5JCh1zgr5+@vger.kernel.org X-Gm-Message-State: AOJu0YyUT3eubpzTrlvXbMWCKkPzkQ3UWnHrhTzabz2Y9EKRJe8O6g6C rjeHhfrMGDE43PyKZk9wK0Am9WbHWg60NORBY1eDMz5vFmqAe6hWTgDxjUDxcYATzww= X-Gm-Gg: Acq92OGWU6oKYnv+P1W75YI7mDDaOqTp+Ly/LQN8vkS1MmQkESWPEDghxxbRbzeqhIU RZRPM6mNaQ2LSYIQOw59swCrnXthchv68CWLz2Gwczs/ApYeuRqpzVF5NRxsMcCbgYPtQvkUOK7 lrce7Fd9H9KLyYUxyFpJMH6Qh1K+rwHnrLkgkGduOWicRPAds/H5mUxHU3uyiSZJl7sezpODI9v YZbjF1t//OKJ9z81W/p4aTb9OVAEea7W8rVpE2yFQuYAzznw6VG/wMx8dyge5IAa5C2z/BCv2Vp kxtffbxRiOH3vTR69GkwJpRW4HbdnlMQQea7o/ESWN/1KjG35rCNM3neWod7Js2+ZBdKKNzGvep A3mFcRoi8kxCPAE1lXdxbd7j5ad/HYdo9iHgke3nZnz9UWcq0jVzr5r5gy2rrKXd5rFCRnQmohr SxMsFI2ISpCDOEa1gAFEVj6bedTPorL7/hyx6mLS4jnpA22kvRmXXpyOchmO3RUwwxF6pH2QxQn PIwyRey0Q== 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: devicetree@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.