Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3331375rdb; Thu, 16 Nov 2023 06:54:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdheEJWvgkGgvoyrW8K4NSnVICSci0D4xQikdPfd7Y4u0S3/Q/mFB73eqQR8k0gEYWUK66 X-Received: by 2002:a17:90b:1811:b0:27d:3a3e:3a45 with SMTP id lw17-20020a17090b181100b0027d3a3e3a45mr13664472pjb.44.1700146476426; Thu, 16 Nov 2023 06:54:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700146476; cv=none; d=google.com; s=arc-20160816; b=upI/Ivlqn1CcJcUYbTIBPEgZ37U5gZvtZv+HlQbxHtI/nAPOW63D5yYk2PwRNfrsLq NEt/k/j7jzu0a8+c5fkbrkFxXGNFVZTiTYZJGQJiRY6FfrQ+tlHRbUCqVYTtVwQj0d2G khzCca27BhyVrp/NSaulLYVuz6Pf5sY2PuLyqOpfzT522ytqVCEbMh/mc+rhg//ngzY/ vazrMyf+jGn/JJyRQijOT7mN30fK/xWEUUvtnycDsMpwzXCHpBmiHvfys7eP0opiRMHZ KbQsZTtBb1re8EqzCZML+vzxUN/DYOGPyF8Warh+Wto6IHbTn+SW0dml29ZbrVCg5S/N s3aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=93PcyiUm7i6Lhh8QjR/CsFJhap/PqPkL9V3uDMBpzNk=; fh=/FBvuzgTce8ks5k6QA2ZXWyNTS/DNQXQKDLfQwAqBTs=; b=UuoDe5cSSur1bBu8MHNEcshbPMm7Wuigb2ALvfR3jvHrDVe3bV5q9slMyxStKJkiIB AJ+K6lJX6nO+sPkrjoRymCj85lt9s3RtNfqZvplAmhsv+vb+iWZY/9TKlxqrIOJT9jMR pB5wsmiMnc7nadxC8OEYepo3gHmdrUU/g2tZU5jS2PjsvwB0ijYfjGwpNHbUwDyhvClN 6mzZaAj4gCRa/smIa+KNF0Cw3pz91WHJp7jaXFG2qDXFFjZjbq/up0lXArPDdVD5SoCG mANA6OULxviU04IysaYiRwGS+l7tOwli+jdafB7mtqf01QheMxV2CGyu8gS2gRSrhnSP H2Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KcdbNvGC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id w7-20020a17090a8a0700b0027d559a84aasi2117636pjn.154.2023.11.16.06.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 06:54:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KcdbNvGC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DDB078026D8F; Thu, 16 Nov 2023 06:54:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345239AbjKPOyV (ORCPT + 99 others); Thu, 16 Nov 2023 09:54:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230030AbjKPOyU (ORCPT ); Thu, 16 Nov 2023 09:54:20 -0500 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC7AC130 for ; Thu, 16 Nov 2023 06:54:15 -0800 (PST) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1f060e059a3so451739fac.1 for ; Thu, 16 Nov 2023 06:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700146455; x=1700751255; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=93PcyiUm7i6Lhh8QjR/CsFJhap/PqPkL9V3uDMBpzNk=; b=KcdbNvGCttnGUcfaonftizypnL0NddBJULzQEoyQepl7d1Jmglc66XJORvBAXf3LBh nNdc5in9/RQdaLzZsjUcee9Ul2uqIBEXI+SPO+v7EKwdjpP+g1/CSosFjVcl3UFLTBWi bXM2xgsoU6WLwZM/+QmcmEvVC4TtQwJNaVs8Rig7CX4XudFCukoYOxMZlwc2EbJc+iI6 wUK5J/ywZgpgLhgCmfVzXvfsL0/cffQZsBI5acaAa8spOT7wUsmeRnZUK5uVB5//kgoV 1u7ljzkAivgbbUqKjlukVle8NMqIlrzONvpggHnDgBrzTsl04FyExRrNtV0NBc4nz18i H+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700146455; x=1700751255; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=93PcyiUm7i6Lhh8QjR/CsFJhap/PqPkL9V3uDMBpzNk=; b=c0FzQ7PuK0N+sN0G1EwbGRpQquFalFE9zXO1+Ihv5lLELcNgHRLoxVRIl4zgCK88bE PIYyLmgfHN4RZD/mWUF96cukQvh+rMFXA7fFsdInJnWmu31K2JhzCAQphESVXywmiLiN eaWIS1N8BVYvxlacgh7SnZgwPEh3+OXNcHK883BY3viw7UCIK6Ls6h9IT9s90sEDA55z EnLM4kKIDmrbRjOHwhOSOgoPNxsehMlqx84aYcHXUOuwQ9+UaGFsY2P0Kf0TIvS7FGpj et0tyP6DsyQUT/UMiBn7zH0y+xYFbWB8LSkT8Mmugtfl1mZKIgPZnRJw+DtwumNQ9h/s 6qvw== X-Gm-Message-State: AOJu0Ywk2j78BmN/pC8Lmllv5lrPIgj3WPopMzKGvusQWN4KBmz6qDru m8Gf/95XmTNqP+YrvPa3GHIfLQ== X-Received: by 2002:a05:6871:b1e:b0:1f4:b55c:46b4 with SMTP id fq30-20020a0568710b1e00b001f4b55c46b4mr20421181oab.43.1700146455172; Thu, 16 Nov 2023 06:54:15 -0800 (PST) Received: from [10.50.4.74] ([50.201.115.146]) by smtp.gmail.com with ESMTPSA id g13-20020a05620a278d00b00767d8e12ce3sm4358648qkp.49.2023.11.16.06.54.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Nov 2023 06:54:14 -0800 (PST) Message-ID: <44cfcd9a-f139-479b-85ff-5fd23c9714b2@linaro.org> Date: Thu, 16 Nov 2023 15:54:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/2] dt-bindings: adc: add AD7173 Content-Language: en-US To: mitrutzceclan 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 , Michael Walle , Andy Shevchenko , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , =?UTF-8?Q?Leonard_G=C3=B6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley References: <20231116134655.21052-1-user@HYB-hhAwRlzzMZb> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBMBCgA+FiEE m9B+DgxR+NWWd7dUG5NDfTtBYpsFAmI+BxMCGwMFCRRfreEFCwkIBwIGFQoJCAsCBBYCAwEC HgECF4AACgkQG5NDfTtBYptgbhAAjAGunRoOTduBeC7V6GGOQMYIT5n3OuDS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134655.21052-1-user@HYB-hhAwRlzzMZb> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 16 Nov 2023 06:54:33 -0800 (PST) On 16/11/2023 14:46, mitrutzceclan wrote: > From: Dumitru Ceclan > > The AD7173 family offer a complete integrated Sigma-Delta ADC solution > which can be used in high precision, low noise single channel applications > or higher speed multiplexed applications. The Sigma-Delta ADC is intended > primarily for measurement of signals close to DC but also delivers > outstanding performance with input bandwidths out to ~10kHz. > > Reviewed-by: Conor Dooley # except reference_select Please drop the tag. You clearly did not test it, so it must be re-reviewed. Do not send code which was not tested. > Signed-off-by: Dumitru Ceclan > --- > V3 -> V4 > - include supply attributes > - add channel attribute for selecting conversion reference > > .../bindings/iio/adc/adi,ad7173.yaml | 166 ++++++++++++++++++ > 1 file changed, 166 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > new file mode 100644 > index 000000000000..92aa352b6653 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > @@ -0,0 +1,166 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +# Copyright 2023 Analog Devices Inc. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/adi,ad7173.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices AD7173 ADC device driver Drop: device driver Bindings are for hardware. > + > +maintainers: > + - Ceclan Dumitru > + > +description: | > + Bindings for the Analog Devices AD717X ADC's. 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/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/AD7176-2.pdf > + > +properties: > + compatible: > + enum: > + - adi,ad7172-2 > + - adi,ad7173-8 > + - adi,ad7175-2 > + - adi,ad7176-2 > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 0 > + > + spi-max-frequency: > + maximum: 20000000 > + > + refin-supply: > + description: external reference supply, can be used as reference for conversion. > + > + refin2-supply: > + description: external reference supply, can be used as reference for conversion. > + > + avdd-supply: > + description: avdd supply, can be used as reference for conversion. > + > + dependencies: Nope, needs testing... See also example-schema. > + refin2-supply: > + properties: > + compatible: > + adi,ad7173-8 > + > + required: Please open example schema and put it in similar place. > + - compatible > + - reg > + - interrupts > + > +patternProperties: > + "^channel@[0-9a-f]$": > + type: object > + $ref: adc.yaml > + unevaluatedProperties: false > + > + properties: > + reg: > + minimum: 0 > + maximum: 15 > + > + diff-channels: > + items: > + minimum: 0 > + maximum: 31 > + > + adi,reference-select: > + description: | > + Select the reference source to use when converting on > + the specific channel. Valid values are: > + 0: REFIN(+)/REFIN(−). > + 1: REFIN2(+)/REFIN2(−) > + 2: REFOUT/AVSS (Internal reference) > + 3: AVDD > + > + External reference 2 only available on ad7173-8. > + If not specified, internal reference used. > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2, 3] > + default: 2 > + > + bipolar: > + type: boolean > + > + required: > + - reg > + - diff-channels > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > + - if: > + properties: > + compatible: > + contains: > + const: adi,ad7173-8 > + then: ??? Maybe you want to use "not"? > + else: > + patternProperties: > + "^channel@[0-9a-f]$": > + properties: > + enum: [0, 2, 3] > + > +unevaluatedProperties: false > + Best regards, Krzysztof