Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2204233lqb; Mon, 27 May 2024 11:06:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVt7E4/MGdedTrERfKuY5hK8408UfGTU23aCVM3UQGa4HcrFqkkXZWISkhsnhataaPCfpQL6+qTAjracnXvhmCBAGuzS/h79kAdafHw0A== X-Google-Smtp-Source: AGHT+IEjVDKmAf04vAhx5jVNpCxQucHoqSfWky4lwnI3J2Kq/Fg/iZ1VCDcghwGXSKJfy66YiVyC X-Received: by 2002:aa7:9319:0:b0:6ed:d164:3433 with SMTP id d2e1a72fcca58-6f8f36f80ebmr9902397b3a.14.1716833187235; Mon, 27 May 2024 11:06:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716833186; cv=pass; d=google.com; s=arc-20160816; b=uXMZ9+/WgMv+319ef0kz8MyDA4uoo3C0jdsAsphGiQjq/AijiR3Xwjk0orDuc1irjw iN5qiZ6Ougz4iPXhWl5ZY6YJXcH5wr/nnh6hkhuThiCEokWQLTW+H+8tibZC2pLKemQP NfM3yUfMuT2Mf6BWEbdUQhRwiOAeHydacNpOyOPIla4fsS6bdo4bWofCtOdp9R92prSj xo0y7USB1vEu6p/VRcRZQASQUE4UoGqLAVR5vi1745gemWFp7enVd7Rp7ixxLkNdWsOt 6e65I67bgL8hT7Wk56mYK240V/LKtPqTe7CraS8dmY0dpZAM14mREK42orAkV1HjNnxT Y9AA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=34A/ZmZcGeNUYAlCO5Xsvpb5KJDEOMjYG9lqMIEZIM0=; fh=rLzXtCF1cdJa81dHR2VG65N+22e2uCo7m76G0K524os=; b=QQ5TiSHsaUPZe3em33WkQyoDd5Sa4vrRYXtpdf4b44EYlEHgYi7N3GC2KcUr8ZKLVJ W5DHRsyj17dv5U9erxuLz9Uk1sidenvxju3mlEBKeXOAtsSN6s7BWxDB2J/CX3T2cgyp HDPSFuBQ052+Odd0+M7WO5X8plHxtQTPrz4zBl3+uAdO6spj/imLziqYw9fLX3NTjWlY H284P6kH+Ue9/kKwbA6OctMo+86zgrqaTk8lES0YEFcX7GaQt6NkDXHsm+lwTl4tvUWW X5z0ZgiDRze2H6w3w53o76SBFavjoT00iocdLeiQApANp05zOhrhd/6FwwrPxhYk0LOU hlbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=angG1vvB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fd4cd216si6512006b3a.229.2024.05.27.11.06.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 11:06:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=angG1vvB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-191300-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191300-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EEEB0B23CD6 for ; Mon, 27 May 2024 17:48:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D5C7155C8D; Mon, 27 May 2024 17:48:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="angG1vvB" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5747915EFCC; Mon, 27 May 2024 17:48:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716832120; cv=none; b=ViZDxVGy81K/ws4RZ9LgeGRsxxXLdwP7JZUUUMVr+rELqIJjnIcKDdJzuaUXiII8hP9Tv5VWso9D6qWhmuI5pZNdfQMXerzrnfpNup500H3CINgl6hBgOkJYZFXHGGpoYfCMYR5Bs0wgNQNd8LXTUzXsSF1CDXsrVldJzHJ6KtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716832120; c=relaxed/simple; bh=Osjj8NjnFAIZU2NVPkIF21tWTVtBoakiM3p/XGDg+2Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WP4KpU7l8NXXGA3mwZP4bKXeDt7eN2vkuANOcU59Ie9IIVlaSFod5Q6K6Wbp6xH7MJqdC6EkEE6gVkZ6UIVGJVa5TN9Cz8IbCjz/WENHsIB/MW1npbkTu/Z/v1klUh/VCOh3gJlan+Du6TpplShcR18RJ4XHeST6BsGVSme6G+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=angG1vvB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FF0CC2BBFC; Mon, 27 May 2024 17:48:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716832119; bh=Osjj8NjnFAIZU2NVPkIF21tWTVtBoakiM3p/XGDg+2Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=angG1vvBB/tISqrSMgWTWIbf561kOmcQ+2YRLZ8hOmXgWKdyKc5jrn1KxIkn3xgUA 7ItUxqSGbJYMhWd5AgC3lhXZnxaoywxAtQx78m8WtWT46ovOLXI2klMAr8KLT8qc6w JRr93tFRa2CAO5P+UpYPpKkUGGdSP3WEdvL0sEqICVwRyfkUb3vyRs5GtCCwr5gOTg wSdmgtC/a5Gw14NtE0Pjm9elV1LCik59I5TIinkEcbLlPIvTyz+9TlRhEfQ9CruP7J 20a03DPvhHLMeUbrNql+prYlpgisTVDJyYRTqYvscOcawZEG9zTw5058jci6aPpyg8 9/hI9lo1QUdew== Date: Mon, 27 May 2024 18:48:35 +0100 From: Conor Dooley To: dumitru.ceclan@analog.com Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , David Lechner , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Dumitru Ceclan Subject: Re: [PATCH v3 1/6] dt-bindings: adc: ad7173: add support for ad411x Message-ID: <20240527-arguably-said-361184ad848e@spud> References: <20240527-ad4111-v3-0-7e9eddbbd3eb@analog.com> <20240527-ad4111-v3-1-7e9eddbbd3eb@analog.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4cO0smBLoF4dPAzc" Content-Disposition: inline In-Reply-To: <20240527-ad4111-v3-1-7e9eddbbd3eb@analog.com> --4cO0smBLoF4dPAzc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 27, 2024 at 08:02:34PM +0300, Dumitru Ceclan via B4 Relay wrote: > From: Dumitru Ceclan >=20 > Add support for: AD4111, AD4112, AD4114, AD4115, AD4116. >=20 > AD411x family ADCs support a VCOM pin, dedicated for single-ended usage. > AD4111/AD4112 support current channels, usage is implemented by > specifying channel reg values bigger than 15. >=20 > Signed-off-by: Dumitru Ceclan > --- > .../devicetree/bindings/iio/adc/adi,ad7173.yaml | 122 +++++++++++++++= +++++- > 1 file changed, 120 insertions(+), 2 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/= Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > index ea6cfcd0aff4..5b1af382dad3 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > @@ -19,7 +19,18 @@ description: | > primarily for measurement of signals close to DC but also delivers > outstanding performance with input bandwidths out to ~10kHz. > =20 > + Analog Devices AD411x ADC's: > + The AD411X family encompasses a series of low power, low noise, 24-bit, > + sigma-delta analog-to-digital converters that offer a versatile range = of > + specifications. They integrate an analog front end suitable for proces= sing > + fully differential/single-ended and bipolar voltage inputs. > + > Datasheets for supported chips: > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD4111.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD4112.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD4114.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD4115.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD4116.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7172-2.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7172-4.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7173-8.pdf > @@ -31,6 +42,11 @@ description: | > properties: > compatible: > enum: > + - adi,ad4111 > + - adi,ad4112 > + - adi,ad4114 > + - adi,ad4115 > + - adi,ad4116 > - adi,ad7172-2 > - adi,ad7172-4 > - adi,ad7173-8 > @@ -129,10 +145,36 @@ patternProperties: > maximum: 15 > =20 > diff-channels: > + description: | > + For using current channels specify select the current inputs > + and enable the adi,current-channel property. > + > + Family AD411x supports a dedicated VINCOM voltage input. > + To select it set the second channel to 16. > + (VIN2, VINCOM) -> diff-channels =3D <2 16> > + > + There are special values that can be selected besides the volt= age > + analog inputs: > + 21: REF+ > + 22: REF=E2=88=92 > + Supported only by AD7172-2, AD7172-4, AD7175-2, AD7175-8, AD71= 77-2: > + 19: ((AVDD1 =E2=88=92 AVSS)/5)+ > + 20: ((AVDD1 =E2=88=92 AVSS)/5)=E2=88=92 > + > items: > minimum: 0 > maximum: 31 > =20 > + single-channel: > + description: | > + Models AD4111 and AD4112 support single-ended current channels. > + To select the desired current input, specify the desired input= pair: > + (IIN2+, IIN2=E2=88=92) -> single-channel =3D <2> > + > + items: > + minimum: 1 > + maximum: 16 > + > adi,reference-select: > description: | > Select the reference source to use when converting on > @@ -154,9 +196,26 @@ patternProperties: > - avdd > default: refout-avss > =20 > + adi,current-channel: > + description: | > + Signal that the selected inputs are current channels. > + Only available on AD4111 and AD4112. > + type: boolean > + > + adi,channel-type: > + description: > + Used to differentiate between different channel types as the d= evice > + register configurations are the same for all usage types. > + Both pseudo-differential and single-ended channels will use the > + single-ended specifier. > + $ref: /schemas/types.yaml#/definitions/string > + enum: > + - single-ended > + - differential > + default: differential I dunno if my brain just ain't workin' right today, or if this is not sufficiently explained, but why is this property needed? You've got diff-channels and single-channels already, why can you not infer the information you need from them? What should software do with this information? Additionally, "pseudo-differential" is not explained in this binding. Also, what does "the device register configurations are the same for all uses types" mean? The description here implies that you'd be reading the registers to determine the configuration, but as far as I understand it's the job of drivers to actually configure devices. The only way I could interpret this that makes sense to me is that you're trying to say that the device doesn't have registers that allow you to do runtime configuration detection - but that's the norm and I would not call it out here. Thanks, Conor. --4cO0smBLoF4dPAzc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZlTHcwAKCRB4tDGHoIJi 0kRjAPsG84+KDR7s4y1gNjTV2xf5bXRkzPtrvnplSviQITN4QgD/XKQvmuVdBUba oKS3NOU3/HdgiortQmm/UlCPF14I/ww= =NQX0 -----END PGP SIGNATURE----- --4cO0smBLoF4dPAzc--