Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2032555lqo; Sun, 19 May 2024 09:55:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs2u159SroDsLvEBfVk4QS1nYFJXtRFapAjVE9BAOKtHulybhJRv2CY0eMVT1XZvoc+ey154DQMbWewTacSZFBe5cnmNp2n1IU1re7Sw== X-Google-Smtp-Source: AGHT+IGpWutkKtZ0rhNV6yn3otltFSTCqsxP6Nwel8Xn0Gn5X9nZJS+sK8j5OXLgrFTDHeAg8zJK X-Received: by 2002:a17:90a:ce04:b0:2b2:7c65:efa0 with SMTP id 98e67ed59e1d1-2b6cc780206mr26684032a91.26.1716137703318; Sun, 19 May 2024 09:55:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716137703; cv=pass; d=google.com; s=arc-20160816; b=lStbpnCylDqhyRjNHxh8L+SwJ0J6oSSKeQIPeUptVOxVtnCg14WJEcMP86fzoq1T88 OrU0BOLaS3V8uJcik9mbaIaY3c4Uy/8GhtTHka6gUh2IZAo/8dZeakt1bKpHUjdwQzBC GDOuI2AA+OqJDcKFAZ+ax58irc7EzOZcQQNSDAGEbhB7SasXR1XnFT9lyLWUmHw6oifX n4cF3knshLh9s0pbpB6BUMRR9dfd+IDttPb8HVDRyKJ/WafnQjZDrdL7zE3l9pM8Z39U IM/SER+UFIVSUdye9/fR4oXm5IjzlO1kJiY2FZ5xADz5M4o8PamZchz9qrPXRCJFGpxt GVIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=a/reRFILvabhzZetWix5Kodw4QL4V0P+KFruoDGUbR4=; fh=r8DStJVKv59m+YtzwcITnUlQYYpga7VouMyxFcrY/eY=; b=t5y3HEcXMxmqC759ZjQUoVzlfqEIUbnRtLb7v72uE6fSZda+NQa9rUmIcC1ZQOL1IY 5j+GkBWQijhr2urQR6nxBAYQ7QW7Q3SN7JuckiwbrAxMLxRgtTjprLiSgafv2FrOjLkX DSWQ8ArZZi4cbOu4RZg6A9H8DW4S385FMNyQB4S6ZDETihWJPu+viUvpfqv8za2dXJmV zqSISoo4hsntiLWoOJiWKVI8KVDZd5d1e3C2sOkNEp/gxi7bW7DFmq2CfgV3/q8PEd0R 7we+hoXYgMi0UWOEBL8KdZLfdF/MlIlHTzGPmhiVSkPnfyqvlUvFKhzhUpll251SHP3Z OsHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uxXKfFos; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628a5bf44si765634a91.39.2024.05.19.09.55.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 May 2024 09:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uxXKfFos; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-183155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183155-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E27C9281C5B for ; Sun, 19 May 2024 16:55:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95B694F20C; Sun, 19 May 2024 16:54:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uxXKfFos" 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 AC53B4501B; Sun, 19 May 2024 16:54:51 +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=1716137691; cv=none; b=GhPCj+STkrY6K81QOcRKO15PkoeV4wDtnr6OudvUCpgQV2VHaCuWa0dhu/Fa/0TY/dwqqV8qC4sAc1/QrruNodICu3oZlipBgJh3YHE8gNA10XAZQczzBEgIegV6TTVq9cMWJrtv7CSZdI37Vqh18gKaTc/ts2QY/Tn40On9dQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716137691; c=relaxed/simple; bh=tR4mc4IZBn+VwLq6uI83LBm5Hav1YvQbFaYXMsVsAn4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ck3AXsVioiPqZotO7bgyWRcaB/zb6GBDoXzxAeMc/+gTVrQdbxGSultBpe33LGkigjyPjfsaRxE0p6v2Z9EW+bFoYuM/T8nr1GYtCJbEtYZgxIMHb4ASBFv8vSvkH26U8By0x8ZrKkeiPE0/wGNJP0BZM/JVGrfW2LHq0ok7brA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uxXKfFos; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69BFEC4AF07; Sun, 19 May 2024 16:54:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716137691; bh=tR4mc4IZBn+VwLq6uI83LBm5Hav1YvQbFaYXMsVsAn4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uxXKfFosQgBvoj1mDrpbBmBnJ9EdbIMjKlWw6Q/FwNu5KemtHTyniqVotxguFcSzv Qel2uVToJ6X/LOvzev76uwqDlHiH3CxGaIZDHJeBWLiHdYu3wDIPSHHNJalY9bGolh hHP4BSStmnGcN5mTEbgwxjWltRt5+x4gFCV2VB74Xtma9PSI9V14FYldMAg03RYO2H o5QfB4pMIvNlkwt7Kxz5GcXwr05T3BBUR94zZ/mw/Eahgzt0cyKiDSqJPAaIX+xW9u yeDDwXh8nRfpp2pHx29ZLN61esD7NFzXnCyvFf5NZoXb7BIgAuRYtMHXsth7NgzPAO SfDacurBvxi4Q== Date: Sun, 19 May 2024 17:54:38 +0100 From: Jonathan Cameron To: David Lechner Cc: "Ceclan, Dumitru" , dumitru.ceclan@analog.com, Lars-Peter Clausen , Michael Hennerich , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/9] dt-bindings: adc: ad7173: add support for ad411x Message-ID: <20240519175438.5959fab2@jic23-huawei> In-Reply-To: References: <20240514-ad4111-v2-0-29be6a55efb5@analog.com> <20240514-ad4111-v2-1-29be6a55efb5@analog.com> <151d6893-3e9e-4331-8dde-5293e75f10ef@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.42; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > =20 > > >> + > > >> + There are special values that can be selected besides the= voltage > > >> + analog inputs: > > >> + 21: REF+ > > >> + 22: REF=E2=88=92 > > >> + Supported only by AD7172-2, AD7172-4, AD7175-2, AD7175-8,= AD7177-2: > > >> + 19: ((AVDD1 =E2=88=92 AVSS)/5)+ > > >> + 20: ((AVDD1 =E2=88=92 AVSS)/5)=E2=88=92 > > >> + Supported only by AD4111, AD4112: > > >> + 12: IIN3+ > > >> + 11: IIN3=E2=88=92 > > >> + 13: IIN2+ > > >> + 10: IIN2=E2=88=92 > > >> + 14: IIN1+ > > >> + 9: IIN1=E2=88=92 > > >> + 15: IIN0+ > > >> + 8: IIN0=E2=88=92 =20 > > > > > > I just made a late reply on v1 where Jonathan suggested that the > > > current inputs are differential with a similar comment to this: > > > > > > It doesn't seem to me like current inputs are differential if they are > > > only measuring one current. They take 2 pins because you need a way > > > for current to come in and go back out, but the datasheet calls them > > > single-ended inputs. > > > =20 > > It seemed to me that the conclusion that we arrived to was to expose the > > precise pins that are used in the conversion and document the selection. > > > > Yes, it is a single-ended channel. So revert to the way it was in V1 us= ing > > single-channel? =20 >=20 > I'd like to hear Jonathan's opinion on this one. Yes. I think we rather went off on a false tangent on this. Any current i= nput using a shunt is of this form and so far we've treated them as single ended= :( e.g. pac1934 does this for it's sense inputs where there is an external 'sense resitor'. Similar for the stand alone afe driver for a current sens= e shunt which is used with a differential voltage input, but presents a single ended current measurement. Sorry for misguiding things :(=20 At the end of this, I don't suppose anyone fancies writing up some notes on how to describe different types of channel? >=20 > > =20 > > >> + > > >> items: > > >> minimum: 0 > > >> maximum: 31 > > >> @@ -154,6 +195,23 @@ patternProperties: > > >> - avdd > > >> default: refout-avss > > >> > > >> + adi,current-channel: > > >> + description: | > > >> + Signal that the selected inputs are current channels. > > >> + Only available on AD4111 and AD4112. > > >> + type: boolean I'm lost. Why do we need this one? Is the channel selection not sufficient to tell us this? > > >> + > > >> + adi,channel-type: > > >> + description: > > >> + Used to differentiate between different channel types as = the device > > >> + register configurations are the same for all usage types. > > >> + $ref: /schemas/types.yaml#/definitions/string > > >> + enum: > > >> + - single-ended > > >> + - pseudo-differential > > >> + - differential > > >> + default: differential > > >> + =20 > > > > > > As suggested above, we should soon have diff-channels and > > > single-channel to differentiate between (fully) differential and > > > single-ended. Do we actually need to differentiate between > > > single-ended and pseudo-differential though? > > > =20 > > Not really, so just a bool differential flag? (this seems weird as we h= ave diff-channels) =20 >=20 > Or we need to change the proposed single-channel property to allow two > inputs. I guess we'll see what Johnathan has to say. I think single ended fits better for the current channels with just one parameter.