From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796406407; b=eiYYbNhFxvuF2ZzIcsHyz4UlB98g5rDxTfBAWjb/zooaPzbxhNI/iDNcaVNmxuI4ep+3 kBRlWvZvt8+LWYh2WoyLUCpCHI5EZZqiZ1NZUGZEWQxKlcl+xzws4LT+DdzkRdFhDOKH9 vN4dqJJJz7VxWMmfxbXMw3U6xuuk+5R8Gh3LRcBi0qQzl5V/qS0QOFeAMckVqHC+qRg2K 2R7pG6Na6e2MROgVFtA/mkTY26wwLPro/vS2FY0zzpJu/s0BAlxkyu57rkrNiDugZqCRc 9KBLQcpBsPD47S9C3XdxMU+zsQnQlRnZH4PpkufEa0IgzoA9tY6p+GRuh+EaMiyrDeA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796406407; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=isPHHifcJWXVd/C14HEANm51M7mx4Ez1m3SWlFc+G2o=; b=rz5x8bRmcyRVKHU332HBG9OwSsOVXJgu1R15IO5RK+QJUH8w1YiasM1FWZ6r965xnFxL 1EqcDdMmxQFT++87wMD2CVF4MJovAsJp4dFTJ3QjvZu251XQyp/Nwoakiox9u2eNz9HBq w6WrVLi2lV+h2YQ9E0InueaYhrmJxphmswaQXa3OPaKyQ/+O6Lc59cpULOMXogF8oLR0f xsDjdVYtBjAlSUUKadPAr+j5qsU4UrXlXohcfNWUnFjJB0yj1NKwyUZeuMvJKn7LJDw8j HyHuR/zcYSraP9QpNnyQZGLjvUKnqDYTa4NxqN5AkZhIZ3npQwNjYOYjqXjUJntj+Ng== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEUoNrTZ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7FB0606A322; Fri, 4 Dec 2026 17:46:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OEUoNrTZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4648D1F00936; Fri, 4 Dec 2026 17:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796406407; bh=isPHHifcJWXVd/C14HEANm51M7mx4Ez1m3SWlFc+G2o=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=OEUoNrTZirLdoMtm0KZxeNn63cypCYKl6AZQynCCRJuCoiZ92OCnwbuuohiJjvMxi w0diWNuBN+USWi8x+TVFEnCdFqWlVT62kKn8uSpNnpfwWewNZZtU+7mJfvkKzUCuqK QuoyZkoCygHoUSFJ03WX4p6iTllE1JccZY/wUsTwVEy8mrTjHOsMIidP7gESdk8dzp x9wvFLpjPEwewxxCIrTYjIKw7Py35oOQ6XRqBTU56Be0S19iJtjg0QaXaZNQGJEimE hdPz1OzrtiGpZVUCIRpj+3uR4xtlXM2SwOStENHuqpuMSAYO9U6afvhhA7CpuG50qm xQ0Kq6EAi41Xg== Date: Fri, 4 Dec 2026 17:46:42 +0000 From: Conor Dooley To: Janani Sunil Cc: Marcelo Schmitt , Nuno =?iso-8859-1?Q?S=E1?= , Michael Hennerich , Jonathan Cameron , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ana-Maria Cusco , Conor Dooley , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux@analog.com, devicetree@vger.kernel.org, Janani Sunil Subject: Re: [PATCH 01/18] dt-bindings: iio: adc: ad4170-4: Restrict AD4170-4 only properties Message-ID: <20261204-yiddish-gauntlet-64a38b6b68d6@spud> References: <20261203-ad419x-release-v1-0-18578ab50524@analog.com> <20261203-ad419x-release-v1-1-18578ab50524@analog.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qiRhHB0A07inkomt" Content-Disposition: inline In-Reply-To: <20261203-ad419x-release-v1-1-18578ab50524@analog.com> --qiRhHB0A07inkomt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 03, 2026 at 04:19:41PM +0100, Janani Sunil wrote: > The binding also covers AD4190-4 and AD4195-4, which lack the integrated > DAC, the XTAL1/XTAL2 pins and the third and fourth excitation current > sources of AD4170-4. Gate all three on the compatible so only AD4170-4 > can select them. >=20 > AD4190-4 and AD4195-4 also cannot AC excite a bridge through their GPIO > outputs, their CHOP_ADC AC excitation codes being reserved. Require both > excitation pins and both nonzero excitation currents for AC excited > bridges on those devices, so that chopping of the IOUT0 and IOUT1 > excitation currents remains the only AC excitation mode. >=20 > Fixes: 1b3cee41235b ("dt-bindings: iio: adc: Add AD4170-4") > Signed-off-by: Janani Sunil > --- > .../devicetree/bindings/iio/adc/adi,ad4170-4.yaml | 81 ++++++++++++++++= ++++-- > 1 file changed, 75 insertions(+), 6 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml = b/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml > index da93213d12d4..ef5ca2ed8210 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4170-4.yaml > @@ -134,17 +134,86 @@ properties: > maximum: 8 > =20 > allOf: > - # Some devices don't have integrated DAC > + # Only AD4170-4 has an integrated DAC. On the other devices, the DAC o= utput is > + # not routed to the multiplexer either, making mux input number 20 res= erved. > - if: > properties: > compatible: > - contains: > - enum: > - - adi,ad4190-4 > - - adi,ad4195-4 > + not: > + contains: > + const: adi,ad4170-4 > then: > properties: > ldac-gpios: false > + patternProperties: > + "^channel@[0-9a-f]$": > + properties: > + diff-channels: > + items: > + anyOf: > + - maximum: 19 > + - minimum: 21 > + > + # Only AD4170-4 can be clocked by an external crystal. The other devic= es > + # have no XTAL1 and XTAL2 pins. > + - if: > + properties: > + compatible: > + not: > + contains: > + const: adi,ad4170-4 > + then: > + properties: > + clock-names: > + const: ext-clk huh, doesn't this say implement the opposite of the comment? > + > + # AD4170-4 has four excitation current sources. The other devices have= two. > + - if: > + properties: > + compatible: > + not: > + contains: > + const: adi,ad4170-4 > + then: > + patternProperties: > + "^channel@[0-9a-f]$": > + properties: > + adi,excitation-pin-2: false > + adi,excitation-pin-3: false > + adi,excitation-current-2-microamp: false > + adi,excitation-current-3-microamp: false This one seems to match. > + > + # Only AD4170-4 can AC excite a bridge with its GPIO outputs. On the o= ther > + # devices, an AC excited bridge needs chopped excitation currents on I= OUT0 > + # and IOUT1, which must be nonzero. The driver also requires them to b= e equal. > + - if: > + properties: > + compatible: > + not: > + contains: > + const: adi,ad4170-4 > + then: > + patternProperties: > + "^channel@[0-9a-f]$": > + if: > + properties: > + adi,sensor-type: > + contains: > + const: weighscale > + required: > + - adi,sensor-type > + - adi,excitation-ac > + then: > + required: > + - adi,excitation-pin-0 > + - adi,excitation-pin-1 > + - adi,excitation-current-0-microamp > + - adi,excitation-current-1-microamp > + properties: > + adi,excitation-current-0-microamp: > + minimum: 1 > + adi,excitation-current-1-microamp: > + minimum: 1 As, I think, does this one. > =20 > # Require to specify the interrupt pin when using interrupts > - if: > @@ -198,7 +267,7 @@ patternProperties: > 17: Internal temperature sensor > 18: (AVDD-AVSS)/5 > 19: (IOVDD-DGND)/5 > - 20: DAC output > + 20: DAC output (AD4170-4 only) > 21: ALDO > 22: DLDO > 23: AVSS >=20 > --=20 > 2.43.0 >=20 --qiRhHB0A07inkomt Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaxL8ggAKCRB4tDGHoIJi 0t6OAP948Vlt7BYvC7Y8E9dR/ce2v0cko0sN1XpaKKB40rcR2AEAvIkoXEEV9chl cvgGhnVNxDWFGDzWSTdyDral4ixRrgc= =U0dn -----END PGP SIGNATURE----- --qiRhHB0A07inkomt--