Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp427641rdb; Thu, 5 Oct 2023 09:48:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERs0OJkOlnWb3iu1xeotgYw5LBQ786PVxf1OeMBy3/SLz/9aZ47KYxaGn7eMikQx9gqfP5 X-Received: by 2002:a05:6a20:12d0:b0:12e:5f07:7ede with SMTP id v16-20020a056a2012d000b0012e5f077edemr6996190pzg.41.1696524484311; Thu, 05 Oct 2023 09:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696524484; cv=none; d=google.com; s=arc-20160816; b=TMOnB+lkPn4UVwvlDpBorZGcqcHg+u1X54ajrVma4ZdL4qfB8uoaP427pSTMRF4VwC 7+hEBWbK8ombuyg4Y5ylMlBCdmYvJ+1Wg3uRo/Dr+FNQQwvebT8YRBXTNz5NwATimBmi UcRZ4Da5oHKM6u6Ywbato3XKR/3i0Ci183wvKkxpDv1gj8k427oGOOIhsyabpFGHoZ2G IqiAh7qDz3CXwoTes4rM7xwngyIVCRRzhCVTVFfQj/oiB3RmlxoIAifvnUqFo9zCUUs2 y0kU4ZXA6PaLgKKQrv+zrcOe7MAqdf/plZLrrFtId+9+G9MhePmrtzHHV++B4Xfs7Mt2 J1xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ljWmD5ziUddBmSF2kFtUbxkaKASLAcD43UcpM4LGJ9o=; fh=MOsjMFzT/ksrhWk5d6BdGd5l5YeMfN97hS9Of2nUico=; b=LR54deaHuFNDdDbGJxtdfv0r9wZj3QESDdmNm6NNiqTwf+G8lE8iZJ3AGmO3RkrGQF /fO1HayXo/OSG7El3teofYjFa8ezZVbfgv6MPC5Q2DrnQ9yr/KgcH7hFEsL/X2bQZAOR 4D0qkBV7rU7uVdBjMNY81MyIBiVChEcpFy4d/Cu2lmL6jFEu/jS/3Z9UTbSBEeEVIXrW 4y5E8/198sc7ShqkLKTasCvyQ1TUc6xTEXPNUMGsIs2DlggaCnBuGPgXmX1BP8dc8ZpM iy6WRk8RvLiebAWyqoxJnIXHqNljGiKfYexAiQH6Xk+tDfhzXysmXDKPlOt5zr6xjuJm xyGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YPOsfm3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id i11-20020a636d0b000000b0056c4189d6cbsi1804360pgc.171.2023.10.05.09.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:48:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YPOsfm3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5EC45887B76E; Thu, 5 Oct 2023 09:48:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbjJEQr3 (ORCPT + 99 others); Thu, 5 Oct 2023 12:47:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjJEQq0 (ORCPT ); Thu, 5 Oct 2023 12:46:26 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCC12171F; Thu, 5 Oct 2023 09:40:19 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5CEEC433C8; Thu, 5 Oct 2023 16:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696524019; bh=FraLcijUUXSrhwCjVGKMA6/d/tnxwhF8Lifa4MCNTko=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YPOsfm3dz4RhG6KFDOBX06PgLcOSfC8N9+axto3f9Q5LK7NfgS4u2rz0Ofx2EYa9h VRD5qWebBKzQAVWkgxg/69adP22bA1IAM0a87Nzh9RMopUlrNheoSsKGDm/yBY5keM a1ryheuz5i77op0cAOazjOYaZyR8GZnavKh+g5algWCLZsaiNghS5ftVJC7p5zboFK 4wI3nlnDXngW+1GxX1RorwQZ6kDXKDZCMVhrYoYNFXo1msUSIAemsswkigLPc0RKob bqUL+prZ2WCFkkppvc+cBwWvBL8VqEyBgdCHtqzV1mCQFTt0TQUks1Ed/Fa3bx1yE2 +1f2sXN70Q08w== Date: Thu, 5 Oct 2023 17:40:19 +0100 From: Jonathan Cameron To: Dumitru Ceclan Cc: linus.walleij@linaro.org, brgl@bgdev.pl, andy@kernel.org, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Andy Shevchenko , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , Leonard =?UTF-8?B?R8O2aHJz?= , 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 v3 1/2] dt-bindings: adc: add AD7173 Message-ID: <20231005174019.4a9bf090@jic23-huawei> In-Reply-To: <20231005105921.460657-1-mitrutzceclan@gmail.com> References: <20231005105921.460657-1-mitrutzceclan@gmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:48:03 -0700 (PDT) On Thu, 5 Oct 2023 13:59:21 +0300 Dumitru Ceclan wrote: > 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. > > Signed-off-by: Dumitru Ceclan Seems the family is a bit wider than covered here as there is at least an ad7172-4 device. It might be nice to support that if not too hard. > --- > V2 -> V3 > - remove redundant descriptions > - use referenced 'bipolar' property > - remove newlines from example > > .../bindings/iio/adc/adi,ad7173.yaml | 130 ++++++++++++++++++ > 1 file changed, 130 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..bf9e3cbf842e > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml > @@ -0,0 +1,130 @@ > +# 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 > + > +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 > + > + spi-cpol: > + type: boolean > + > + spi-cpha: > + type: boolean I'd like to see supplies listed here as well. > + > + required: > + - 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 How can this go to 31? Do we have devices with 32 input lines? > + > + bipolar: > + type: boolean > + > + required: > + - reg > + - diff-channels > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + #include > + > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + adc@0 { > + compatible = "adi,ad7173-8"; > + reg = <0>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + interrupts = <25 IRQ_TYPE_EDGE_FALLING>; > + interrupt-parent = <&gpio>; > + spi-max-frequency = <5000000>; > + > + channel@0 { > + reg = <0>; > + bipolar; > + diff-channels = <0 1>; > + }; > + > + channel@1 { > + reg = <1>; > + diff-channels = <2 3>; > + }; > + > + channel@2 { > + reg = <2>; > + bipolar; > + diff-channels = <4 5>; > + }; > + > + channel@3 { > + reg = <3>; > + bipolar; > + diff-channels = <6 7>; > + }; > + > + channel@4 { > + reg = <4>; > + diff-channels = <8 9>; > + }; > + }; > + };