Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp430399rdb; Thu, 15 Feb 2024 04:52:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW1EwdxhQ8oGVufM32dgWM6H/Mwz4V2zY1VOEgldKBp9spWut/Vu6LEwEUd7rSITlZJB16lsujyoUMt4fNQN989S4Ei3tB05KZEQrTmBw== X-Google-Smtp-Source: AGHT+IFpVAbh8QzSEKS9MYtmWOWAIoxwzTaDWIhqvbj97cUpXcI/5dDnkDbQTdkZa0U0uYRUm+pi X-Received: by 2002:ac8:5751:0:b0:42d:c9d0:a796 with SMTP id 17-20020ac85751000000b0042dc9d0a796mr2500424qtx.17.1708001577344; Thu, 15 Feb 2024 04:52:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708001577; cv=pass; d=google.com; s=arc-20160816; b=y08djB+0Z57zu4jwbgiHSv/ElQNTI82ZU70oPrVRFS0KLny/JxStuYXknbPJ813cAi H62K2I88gZlmP9ut1QZTOVoZru8qWtCtlXZdH2iSAv4S7ifbs5fn50RyWBVa2j3ZFVy/ L3kQp0sxPKWkys44oa1LfCMRNQbVswhc8CZZjrOYF1nbFgTWVa4w9O9kvqG6l7vFgx05 FoLPd0HPwgZ7TG6JrUeOkLuQ1yDAJEpwqKXakEPYoGUf9MV7wluI/jM70T+HSbS8ll2E aMA9yZCOxRxCFtDqHWHpJjX1t7UE54Nwbg+wUq00rduBXMBMxl6P+2x6HauaeHPLEdhT HZsA== 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=nX983C3wmi2s1C3kr/XXN3lqo6oLqipL4+d8xiPAkhU=; fh=JDVQwusp1UNuzCGtp/ZtCFwfOUAg9Ia8xEIxAyz3U3E=; b=AAOFO0kefV4q/WsLRp5NUq5uflxQBTl802+RrS5cFfIa9xBTH/vuOJGnvIlMQDFDlZ X3RYTAAPuMiwmmUCVfU3FVT8zK518FAtDHUkHQuI1wvlJ7Z2/5ChBfAM2ldMDzKxVA4Z rx7ayVdXsrOOIedv2NSp3TZdLTVByQncTc0+7yyqBDc4kEX738FsK2iSDxZme2b5ykps 0YFbzh8o0rmXaCyGj2Tua1jTzdSHm2z9u++QevYyH6rKN4LpOvUHLfZGr3VYp+jEFiAo 16odhHr5E5kbXpJYcB/Fplx8Tzt8E+8b6iwlo06PFFJlCGNztKRzYYFj/TDJWHHZ4x9y IPfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CZbCU7rO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66929-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d21-20020ac847d5000000b0042c33cae5b5si1227638qtr.239.2024.02.15.04.52.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 04:52:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CZbCU7rO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66929-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66929-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1DA181C20B61 for ; Thu, 15 Feb 2024 12:52:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D41D512EBEB; Thu, 15 Feb 2024 12:52:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CZbCU7rO" 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 F304F12E1C3; Thu, 15 Feb 2024 12:52:48 +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=1708001569; cv=none; b=YOe4yeay1w352ScOF+uj/UTLOdB05u/DjRDbqnUFXxz8AvhnVCZBSTBI6rrd8jEvIywDzk3znwrfv0+ooDueSJZBsHI2YbJiyM5+rYPFYHvPTVH8lOYOJzlvTYMt5uJEUyKc4YIIHqxVmLXnRwfwt2G3w96MbdxVJjZXwqUmgzk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708001569; c=relaxed/simple; bh=F0unL5VuXkG8H7993BUREvJS7UUzi8Iu+yOsyj+bbuY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VYEHFIAki7oxwOcOiNn0GMr2QsnK4HJkzXnmdDy8vajtE4ReWXaGSAv7L7m8u7h6S9BuLEJ/nP5nZszpxXgY8RZdycPOlu7itWj+Hhw1PMj41OG5KooB9YaLiqwuz30uNo1G+diLe37XEQGCQXccnFxavzqKtj4Clye+HxfC24c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CZbCU7rO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3A5FC433F1; Thu, 15 Feb 2024 12:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708001568; bh=F0unL5VuXkG8H7993BUREvJS7UUzi8Iu+yOsyj+bbuY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CZbCU7rOcaW4HF/VJkFNGBEO4QKh+hos4AUxFmd8z9gQtif/uotluzP9Ie1MJ2AKj ccTb+IcaRfYEW5BFy6ROKH9JzxNP6dVAxw/qjrr8tgdl7lpySoJ1uDmCYu6b3iMIEg MdDyj7ykYSmI0xJZNveKSSv0jqRfYL2mEDLxpJXLu7sl4BhthELmTbxxGstu/RV8sZ jHYFzS88Br7bxzV2E9MgE6/DJsMcl6Ez8Zw9d9i3wnlQPq3b9iuFasii/0tCVd54Nc 86fdeQDUF2cFq9qVHBR5o70lQYUEBdXocLsJDbZw8kSquJOavntQj3GdUvErmLBl+6 i6q3OZ4UY2v9w== Date: Thu, 15 Feb 2024 12:52:43 +0000 From: Conor Dooley To: Alisa-Dariana Roman Cc: alexandru.tachici@analog.com, alisa.roman@analog.com, conor+dt@kernel.org, devicetree@vger.kernel.org, dlechner@baylibre.com, jic23@kernel.org, krzysztof.kozlowski+dt@linaro.org, krzysztof.kozlowski@linaro.org, lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, michael.hennerich@analog.com, robh+dt@kernel.org Subject: Re: [PATCH v3 4/5] dt-bindings: iio: adc: ad7192: Add AD7194 support Message-ID: <20240215-demystify-abacus-c8fbfe1e9f2b@spud> References: <20240208172459.280189-1-alisa.roman@analog.com> <20240208172459.280189-5-alisa.roman@analog.com> <20240208-occupancy-shudder-514d8569e261@spud> <73d01418-65e2-4327-b6b3-c4de501c2920@gmail.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="eVxVWuwy3y01LPUE" Content-Disposition: inline In-Reply-To: <73d01418-65e2-4327-b6b3-c4de501c2920@gmail.com> --eVxVWuwy3y01LPUE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 15, 2024 at 02:13:38PM +0200, Alisa-Dariana Roman wrote: > On 08.02.2024 20:03, Conor Dooley wrote: > > Hey, > >=20 > > On Thu, Feb 08, 2024 at 07:24:58PM +0200, Alisa-Dariana Roman wrote: > >=20 > > > +patternProperties: > > > + "^channel@([0-7a-f])$": > > > + type: object > > > + $ref: adc.yaml > > > + unevaluatedProperties: false > > > + > > > + properties: > > > + reg: > > > + description: The channel index. > > > + minimum: 0 > > > + maximum: 7 > >=20 > > There are only 8 possible channels, at indices 0 to 7, so why is the > > pattern property more permissive than that? Shouldn't "^channel@[0-7]$" > > suffice? > >=20 > > > + > > > + diff-channels: > >=20 > > > + description: | > > > + The differential channel pair for Ad7194 configurable chan= nels. The > > > + first channel is the positive input, the second channel is= the > > > + negative input. > >=20 > > This duplicates the description in adc.yaml > >=20 > > > + items: > > > + minimum: 1 > > > + maximum: 16 > >=20 > > Hmm, this makes me wonder: why doesn't this match the number of channels > > available and why is 0 not a valid channel for differential measurement= s? > >=20 > > Thanks, > > Conor. >=20 > Hello and thank you for the feedback! >=20 > I will change the pattern property and the description. >=20 > Regarding the channels, I followed the existing style of the driver for t= he > AD7194 channels: one iio channel for each pseudo-differential input > channel(AINx - AINCOM), summing up to 16 channels; and one iio channel for > each differential channel (AINx - AINy), summing up to 8 channels. I don't know what question this is answering. Everything here is about channels so it is hard for me to relate it back. Please reply inline & not at the end of the message to everything :) Was it meant to answer the following? > > > + properties: > > > + reg: > > > + description: The channel index. > > > + minimum: 0 > > > + maximum: 7 > >=20 > > There are only 8 possible channels, at indices 0 to 7, so why is the > > pattern property more permissive than that? Shouldn't "^channel@[0-7]$" > > suffice? If it was a response to this, the reg property only allows 8 channels so the regex should only allow 8 too. The number after @ must match the number in reg. If using each of the 16 "pseudo-differential" inputs in isolation is thing you want to be able to do, your reg property does not allow it. > For the > diff-channels, I thought the possible values should be 1->16 corresponding > to AIN1->AIN16 (I will add this to the description as suggested by David). With a description, this should be fine. --eVxVWuwy3y01LPUE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZc4JGwAKCRB4tDGHoIJi 0uGpAQDJPZr9YPefeO7EEWAtw6D6/mFbOUDNFDHU5QLxuDJz2QD+KySncCvuevdB iY+/Lv/jb2kLjyD5AhdAh3y9bA/icQ0= =MYMP -----END PGP SIGNATURE----- --eVxVWuwy3y01LPUE--