Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp624541rdb; Mon, 15 Jan 2024 08:12:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IErhIf7tCKrHlOGoYi3lplpx49umXy9X2e4aGNE1GnjFdSqlYlaF860++9XA0v2nGu/LcFY X-Received: by 2002:a05:6358:91a:b0:175:e393:130f with SMTP id r26-20020a056358091a00b00175e393130fmr2217096rwi.26.1705335129413; Mon, 15 Jan 2024 08:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705335129; cv=none; d=google.com; s=arc-20160816; b=aNGUiaQk/8sVlEl8l38Cw5b1V1JiyDu4QUNKLzoL4KLh4cZixwyTNxxNur0HJwVCGk Inl8nHubnANTd0Rwdv66BNbxUHer8cjxPNNYyjxk3HavW4ZGPEnUd57GefuWoK884G94 bLJzM1OTsrPGNaSKMjxjPvnjdclcvdn6fW8sBvj7AZkz4D/qrqIZfZR6Tk5Y/++alz1g LW2l3D8k5bbrInDcYwfVVP8cPbylv8pJysDXcHsMkCBVvGXoacTsZUByrDyYvlfwFVRO LQv672FM5HHzpdQjy7gHhJNtjF5XsIe6A+k1FB9GXn5VOOHHT0Yrs1AUg58FMFxmckZl GW9g== ARC-Message-Signature: i=1; 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=osZb8oVz7q4D5qqlYgSmCYG/bEC+MB0mr8UF6eWQrjY=; fh=h/X9ogTDWh4heXxoo26v8vbwe5oI0rGM7iyqVx/YeKY=; b=0PO3ieloQEYQlV25fhM9C7uOOZOpL4zKixUSPqqBciYoBlfqNjvcSvaLdu3SCdneS5 hZZuAkHLaWne/O6u2dsYZj3uISZPeUhCJIAibyVuuzLdnJtE8v4hSZzCqrxdm4qNePie hUCcXR1ooRAaiYn+F1c62bl1KAOPdK1RkENPb2KB+sajJlFyvVuE5kkpY/hpbaB4gVaV CtC21o6xy9ma+rBs7O3T8DEdrJjAmjbRJGz7rUgN6cN7RvlPhoV2Sn82LspBtWprKoFT 68katgujNirayYMTPO7Jqwc/htLQ2mOmKGUMbLs0aZs2mcADAv5N0q0I2DIJ+1VNf17E bm0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PrTxj9h8; spf=pass (google.com: domain of linux-kernel+bounces-26228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26228-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 l189-20020a6325c6000000b005c67e10f238si9306845pgl.492.2024.01.15.08.12.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:12:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26228-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=PrTxj9h8; spf=pass (google.com: domain of linux-kernel+bounces-26228-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26228-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 B4BC0B22471 for ; Mon, 15 Jan 2024 16:10:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0E4C17BAA; Mon, 15 Jan 2024 16:10:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PrTxj9h8" 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 BBA0017BA1; Mon, 15 Jan 2024 16:10:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27C89C433C7; Mon, 15 Jan 2024 16:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705335020; bh=w/OftDh4haN2MUyHJodrZDqK6lQj9eUZRQeCxQ/l7Ac=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PrTxj9h8iv3oUVYDlsDMw6ziBXPwyLBfz1FBQFz1heG31SYFyJOeUEjqZT04R/kQT oyP2cP8Ir19etl5iRIbATXbSLxSUonr0Y7EftVyljpVF426h+dauRzy2AUqa9JLUlL uvxgUU+4mUiLMQj3LvXtY9avfeK/nAR2Pt0CQRQSuUIygt2LQPNVoX+QnuzrZ56tlb zrJKICdYsb1Wxa05xvMMfs7XJ3MC5JmF8zm4h+4fNBlWsiFVnDGZdc4Um7jvBBkJmi F6duLj91sviOzFqpwdxWAeIwKoK3Vh4JXmzWqpbY/X8EPQfOpeKOKOjsbTqulHqEfC M0JSUGFpvTK2A== Date: Mon, 15 Jan 2024 16:10:13 +0000 From: Conor Dooley To: Dumitru Ceclan Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Shevchenko , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , Leonard =?iso-8859-1?Q?G=F6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] dt-bindings: adc: ad7173: add support for additional models Message-ID: <20240115-praising-disdain-d81d4ce69194@spud> References: <20240115135416.10595-1-mitrutzceclan@gmail.com> <20240115135416.10595-2-mitrutzceclan@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="sV1oz/EzmBq1F27T" Content-Disposition: inline In-Reply-To: <20240115135416.10595-2-mitrutzceclan@gmail.com> --sV1oz/EzmBq1F27T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 15, 2024 at 03:53:04PM +0200, Dumitru Ceclan wrote: > Add support for: AD7172-2, AD7175-8, AD7177-2 > Add hardware description of the AD771X family instead of "Bindings for" > AD7172-4 does not feature an internal reference, check for ext-ref >=20 > Signed-off-by: Dumitru Ceclan > --- > .../bindings/iio/adc/adi,ad7173.yaml | 50 +++++++++++++++++-- > 1 file changed, 46 insertions(+), 4 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/= Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > index 7c8caef76528..6d4b26e43144 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > @@ -11,19 +11,33 @@ maintainers: > - Ceclan Dumitru > =20 > description: | > - Bindings for the Analog Devices AD717X ADC's. Datasheets for supported= chips: > + Analog Devices AD717X ADC's: > + The AD717x family offer a complete integrated Sigma-Delta ADC solution= which > + can be used in high precision, low noise single channel applications > + (Life Science measurements) or higher speed multiplexed applications > + (Factory Automation PLC Input modules). The Sigma-Delta ADC is intended > + primarily for measurement of signals close to DC but also delivers out= standing > + performance with input bandwidths out to ~10kHz. > + > + Datasheets for supported chips: > 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 > https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7175-2.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7175-8.pdf > https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7176-2.pdf > + https://www.analog.com/media/en/technical-documentation/data-sheets/= AD7177-2.pdf > =20 > properties: > compatible: > enum: > - adi,ad7172-2 > + - adi,ad7172-4 > - adi,ad7173-8 > - adi,ad7175-2 > + - adi,ad7175-8 > - adi,ad7176-2 > + - adi,ad7177-2 > =20 > reg: > maxItems: 1 > @@ -89,8 +103,10 @@ patternProperties: > refout-avss: REFOUT/AVSS (Internal reference) > avdd : AVDD > =20 > - External reference refin2 only available on ad7173-8. > - If not specified, internal reference used. > + External reference refin2 only available on ad7173-8 and ad717= 2-4. > + Internal reference refout-avss not available on ad7172-4. > + > + If not specified, internal reference used (if available). > $ref: /schemas/types.yaml#/definitions/string > enum: > - refin > @@ -111,12 +127,15 @@ required: > allOf: > - $ref: /schemas/spi/spi-peripheral-props.yaml# > =20 > + # Only ad7172-4 and ad7173-8 support refin2 > - if: > properties: > compatible: > not: > contains: > - const: adi,ad7173-8 > + anyOf: > + - const: adi,ad7172-4 > + - const: adi,ad7173-8 > then: > properties: > refin2-supply: false > @@ -129,6 +148,29 @@ allOf: > - refout-avss > - avdd > =20 > + # Model ad7172-4 does not support internal reference > + # mandatory to have an external reference > + - if: > + properties: > + compatible: > + contains: > + const: adi,ad7172-4 > + then: > + patternProperties: > + "^channel@[0-9a-f]$": > + properties: > + adi,reference-select: > + enum: > + - refin > + - refin2 > + - avdd > + default: false The default shouldn't be needed here since the property is required. > + required: > + - adi,reference-select > + oneOf: > + - required: [refin2-supply] > + - required: [refin-supply] I'm a little curious - the enum allows avdd but you are requiring one of these two references to be set. Is one required if avdd is used as the reference? Thanks, Conor. > + > unevaluatedProperties: false > =20 > examples: > --=20 > 2.42.0 >=20 --sV1oz/EzmBq1F27T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZaVY5QAKCRB4tDGHoIJi 0g7lAQCHDDAXjWK+zjzjnxHJR7BmkaEep2iUVKmmYQAuU3Z6twEAgeAYhyvVcXaM 9H46UOZvwaIiwAfWx07mC2comwosZAM= =tR9x -----END PGP SIGNATURE----- --sV1oz/EzmBq1F27T--