Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5421751rdb; Wed, 13 Dec 2023 08:11:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTh3wXh/wf4lxtAMqxH2hmOOQajRdJ7zATQfj73nU4ad4rTh3wseyBe3SC9t9OsaZn1Sn/ X-Received: by 2002:a17:90a:4094:b0:286:6cc1:27e with SMTP id l20-20020a17090a409400b002866cc1027emr3713880pjg.73.1702483901580; Wed, 13 Dec 2023 08:11:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702483901; cv=none; d=google.com; s=arc-20160816; b=NcgUrV5ujgmaHc6sLx4t8YsorGNVG/mqQBIowXaufgbrL9j7dctovPYgQ0/Au6Ioh2 kj/+ge9FP21Q4JipBqQBtS2xx5Xl5th9V4DZ10tZ5qDXx/uK9V4hBdeRi1xBKLET97HL KnfDmC8J9Ahutz//h6YVt557nMCYSWYLKOJa8yqs/S1mLg+qtlu03w7qAnyAGrgMaeSZ YRIqwkkpPDT/LZprowHSkfVZalHwTe6aWXW2GrS18yK6+t38AWHmNIo4FX1DdKPVm3cb gx+JugXr3OEfatUjoxE6pKxoMFYOhuOfJHSRjl8v02A9THWgNJNh2/3ksAzalwHtUqOQ W8HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qS0EOadTkjFDBgITeqP5tjisiSUzfDWDMbSZFVupxV8=; fh=vzsDz8bZJ50mj36y8nxVaiodXzhIi7LB2Yn3GrfFEnI=; b=C8oTASMW6k4B843sC9O/TiovW8ttqOC0zvAOLW7Y6ghg4HvMUbPOlzD1GdWDRy73zs WUJ+9EFxy980xLZ/NvyCVAvUD0UdGgEWzCc1KiiUVFj/kEeD3i0jFLBF/ZqdvZhQNRkO ZbwBD7f8SZEsDTFfrIihsjdejKKcZkVustrojF9GsgwaLBCQMgCKp3I9sa3KiFqR7LxB Py7QHrgq7StT4SQAmVtiWLr2AisHqIWuGCf2YrYSjNCZzfD7YUuLOAE8poA/yJ1/kDUn KUjXfIgC4c+KVkwxcc36QO5QsfLYUnZWcPTcaV6lerNT8yr6kuVa9JylMnU8v7/i79ki xYqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DaPBC8q9; 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=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id y3-20020a17090a86c300b0028649cc70b2si11111052pjv.14.2023.12.13.08.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:11:41 -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=@kernel.org header.s=k20201202 header.b=DaPBC8q9; 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=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5502880401B7; Wed, 13 Dec 2023 08:11:37 -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 S1379329AbjLMQLD (ORCPT + 99 others); Wed, 13 Dec 2023 11:11:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbjLMQKj (ORCPT ); Wed, 13 Dec 2023 11:10:39 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D57691 for ; Wed, 13 Dec 2023 08:10:45 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF16BC433C7; Wed, 13 Dec 2023 16:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702483845; bh=6Cp4QoPrziOGTCMSk4UORYT4B4hBTsbrJjJUD3vnofQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DaPBC8q9bSXwlg7DJK7lOva3fmQIvfCrRPjT/JKRo+D7GNADZym1lXreSvh0xEGcX 7qqXo8suAV7zGz1guhGKcOcDk9iA+dlRKVenK89Uq3l2sNHGIrydXH3/HQV2LSkcMJ JQEGTYWwY5DupDh9nWxWzVSicVtHkoJ6DyPgstdY9fLz51eLhJLNXkQZA58d+qBbZ+ OymwzDhn92zRL8rO9cQ+L3/QSaWecCmxRCQlBLM9c5gSAJRQYD5vjTKERx+COT5cd2 hCTY5Wb+x11tidCp0usO1V9s5usaSagfL8mXKqtnvnDShZvWUBIJBD5Q/UOzMbey05 JfI5UYYV7UWIQ== Date: Wed, 13 Dec 2023 16:10:40 +0000 From: Conor Dooley To: David Lechner Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Michael Hennerich , Nuno =?iso-8859-1?Q?S=E1?= , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] dt-bindings: iio: adc: Add binding for AD7380 ADCs Message-ID: <20231213-grooving-bulk-58fcfc20be11@spud> References: <20231213-ad7380-mainline-v2-0-cd32150d84a3@baylibre.com> <20231213-ad7380-mainline-v2-2-cd32150d84a3@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QDYW7xwkRaYUe+Lj" Content-Disposition: inline In-Reply-To: <20231213-ad7380-mainline-v2-2-cd32150d84a3@baylibre.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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]); Wed, 13 Dec 2023 08:11:37 -0800 (PST) --QDYW7xwkRaYUe+Lj Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 13, 2023 at 05:21:19AM -0600, David Lechner wrote: > This adds a binding specification for the Analog Devices Inc. AD7380 > family of ADCs. >=20 > Signed-off-by: David Lechner > --- >=20 > v2 changes: > - Added maxItems to reg property > - Replaced adi,sdo-mode property with spi-rx-bus-channels > - Made spi-rx-bus-channels property optional with default value of 1 > (this made the if: check more complex) > - Changed example to use gpio for interrupt >=20 > .../devicetree/bindings/iio/adc/adi,ad7380.yaml | 107 +++++++++++++++= ++++++ > MAINTAINERS | 9 ++ > 2 files changed, 116 insertions(+) >=20 > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml b/= Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml > new file mode 100644 > index 000000000000..43d58c52f7dd > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml > @@ -0,0 +1,107 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Analog Devices Simultaneous Sampling Analog to Digital Converters > + > +maintainers: > + - Michael Hennerich > + - Nuno S=E1 > + > +description: | > + * https://www.analog.com/en/products/ad7380.html > + * https://www.analog.com/en/products/ad7381.html > + * https://www.analog.com/en/products/ad7383.html > + * https://www.analog.com/en/products/ad7384.html > + > +$ref: /schemas/spi/spi-peripheral-props.yaml# > + > +properties: > + compatible: > + enum: > + - adi,ad7380 > + - adi,ad7381 > + - adi,ad7383 > + - adi,ad7384 > + > + reg: > + maxItems: 1 > + > + spi-max-frequency: > + maximum: 80000000 > + spi-cpol: true > + spi-cpha: true > + > + spi-rx-bus-channels: This is now being framed as a standard property, so I think it should be in spi-peripheral-props, no? Granted, you'd need a rather more generalised explanation of the property in that case. > + description: > + In 1-wire mode, the SDOA pin acts as the sole data line and the SD= OB/ALERT > + pin acts as the ALERT interrupt signal. In 2-wire mode, data for i= nput A > + is read from SDOA and data for input B is read from SDOB/ALERT (an= d the > + ALERT interrupt signal is not available). > + enum: [1, 2] Jonathan also mentioned specifying that this defaults to 1-wire. I didn't see a response or that implemented. Did you miss that comment =66rom him? Cheers, Conor. > + > + vcc-supply: > + description: A 3V to 3.6V supply that powers the chip. > + > + vlogic-supply: > + description: > + A 1.65V to 3.6V supply for the logic pins. > + > + refio-supply: > + description: > + A 2.5V to 3.3V supply for the external reference voltage. When omi= tted, > + the internal 2.5V reference is used. > + > + interrupts: > + description: > + When the device is using 1-wire mode, this property is used to opt= ionally > + specify the ALERT interrupt. > + maxItems: 1 > + > +required: > + - compatible > + - reg > + - vcc-supply > + - vlogic-supply > + > +allOf: > + - if: > + required: > + - spi-rx-bus-channels > + then: > + if: > + properties: > + spi-rx-bus-channels: > + const: 2 > + then: > + properties: > + interrupts: false > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + spi { > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + > + adc@0 { > + compatible =3D "adi,ad7380"; > + reg =3D <0>; > + > + spi-cpol; > + spi-cpha; > + spi-max-frequency =3D <80000000>; > + > + interrupts =3D <27 IRQ_TYPE_EDGE_FALLING>; > + interrupt-parent =3D <&gpio0>; > + > + vcc-supply =3D <&supply_3_3V>; > + vlogic-supply =3D <&supply_3_3V>; > + refio-supply =3D <&supply_2_5V>; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index fe1f6f97f96a..e2a998be5879 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -430,6 +430,15 @@ W: http://wiki.analog.com/AD7142 > W: https://ez.analog.com/linux-software-drivers > F: drivers/input/misc/ad714x.c > =20 > +AD738X ADC DRIVER (AD7380/1/2/4) > +M: Michael Hennerich > +M: Nuno S=E1 > +R: David Lechner > +S: Supported > +W: https://wiki.analog.com/resources/tools-software/linux-drivers/iio-ad= c/ad738x > +W: https://ez.analog.com/linux-software-drivers > +F: Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml > + > AD7877 TOUCHSCREEN DRIVER > M: Michael Hennerich > S: Supported >=20 > --=20 > 2.34.1 >=20 --QDYW7xwkRaYUe+Lj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZXnXgAAKCRB4tDGHoIJi 0olQAQD0uGzuJAnzrkjyNQSFOQ2fC9H/eELRnpvt8Qn7xokQfAEAtm9kgIN7xibR NYDDxEwEe+7NATpX/ImfrcOZYOoIIQw= =xfs8 -----END PGP SIGNATURE----- --QDYW7xwkRaYUe+Lj--