Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp420169rdb; Thu, 5 Oct 2023 09:34:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMHNW+7cYQN6FVGWFdC2Rp3I8y4ls6ijj5VmjDtEEYo8XT0JurHN9XhPe8+t1rO4rApJnO X-Received: by 2002:a05:6a20:549b:b0:161:2bed:6b3a with SMTP id i27-20020a056a20549b00b001612bed6b3amr6447291pzk.17.1696523657912; Thu, 05 Oct 2023 09:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696523657; cv=none; d=google.com; s=arc-20160816; b=C0jEuu/KvYCHDugC+f5uMwBuuFEN5eW1r11HPqf1B5YgNknsa1UbGKbVYtKj/SIUPy vQTseuFGt2X7+mJJaI0jIuYWDRVbzgga5V/z+V13DYXaM5YpooMA4aDze4ycW0roBD4y KvUiuWOxk4bqhp63N28nq2jP4IHYeWPQmBqyVP9vhetkecPUWzLf+tSkReLyVjMJWWh0 y1el2P0mWmbEtNOqvP7Vp0PnAV1UNXugGV823lRx+e1yml4pg7kK5BaUZlWG+dXjkcXS nACVa2WHhi3n8fU+mqtSeGKxrrkdijMLAb3dtp4NOoFOwOXos0usXgXR+dXCeLgq+Zj7 gJqw== 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=IEcm/+bK9r5BrjavUdjkhNhK2cnk+Wo0i2p8sD2F/dk=; fh=D55cFfzrYvRiRZ9kkLTtOKxbJ0+MPXnTDw05ujbXvz0=; b=GaRnoGJ/NvSlDr0QWTkybUHyqnh6/yB1AwB6f8eoYjfhHS8+EljODjMXJvj4wcr2Qu fwjYFPF2n24REKB/wtOaQkCVMV/E7ux8d3srNAWOCUSTNhNBE4n+uFzJtcBMcnGI1VFR sYGRPwCeVtBJ667D6iDqCcHwprfEYNgcCdRVFNMa+vsLMjiWtL/wCHQSXQY+IYtMutwh YrBFpTj8cRo1sm4TUkGNJJR8e6dASwgREiJzpKY2r4BrF3pjpesJguuO2+Y/d8WJ4s5A gZNJrobaztQCUV1BIdS9cuxybuRNnrvcJRjlbjw23IB4Qz1O2emj2MhZfQwolHEGHioI 0cDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LqCYd0wS; 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 f20-20020a63f114000000b00573fc71f6d9si1892934pgi.64.2023.10.05.09.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:34:17 -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=LqCYd0wS; 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 36CFC802587F; Thu, 5 Oct 2023 09:33:43 -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 S234497AbjJEQdZ (ORCPT + 99 others); Thu, 5 Oct 2023 12:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237125AbjJEQcc (ORCPT ); Thu, 5 Oct 2023 12:32:32 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B8EE29B30; Thu, 5 Oct 2023 08:38:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C34DDC433C7; Thu, 5 Oct 2023 15:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696520320; bh=xqrKx4Kd9+GEwmVN2AFDTKEreQZrRE6Wy71JqH75+OE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LqCYd0wShQEfQ34aCPNRYpG9e1rGe5FNRozfs/5sOKIA7TYVUgPTcijdTj55JFWfQ auvuso6FRNRvidbRggXlLxtCwXiF4iNXlwfJGvSsgs/hO/3op6t1hPMIONqaXIrZ2w Q2mv8hKik9Ebvlu064LHGgiEYBub0T7YobcTM+ShQ4zVSJljVfhHsn+FnEEg/UkAaR BrErZ1FXfwVsWQNVbdO755cLE4C3aM6wzbhZZHZouxWn1O/C4XMTe0UnflQ14xMm1W Tx4Z1/aYWNgLgnxbBIfmbcjKn39eOQGviAjTdvZ0M81mTSMbXkfuSyR4yo7ZkMzGHY 8J1tjnGUqTqYQ== Date: Thu, 5 Oct 2023 16:38:44 +0100 From: Jonathan Cameron To: werneazc Cc: Rob Herring , krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lars@metafoo.de, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Andre Werner Subject: Re: [PATCH 1/2] dt-bindings: iio: adc: ti,ads7038: Add description for ADS7038 Message-ID: <20231005163844.3294e4e1@jic23-huawei> In-Reply-To: References: <20231004102330.3713-1-andre.werner@systec-electronic.com> <20231004151150.GA3140591-robh@kernel.org> 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=UTF-8 Content-Transfer-Encoding: quoted-printable 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:33:43 -0700 (PDT) On Thu, 5 Oct 2023 05:51:40 +0200 werneazc wrote: > Dear Mr. Herring, >=20 > On Wed, Oct 4, 2023 at 5:11=E2=80=AFPM Rob Herring wrot= e: > > > > On Wed, Oct 04, 2023 at 12:23:29PM +0200, werneazc@gmail.com wrote: =20 > > > From: Andre Werner > > > =20 > > > > Needs a commit message. =20 >=20 > Added in an upcoming commit. >=20 > > =20 > > > Signed-off-by: Andre Werner > > > --- > > > .../bindings/iio/adc/ti,ads7038.yaml | 51 +++++++++++++++++= ++ > > > 1 file changed, 51 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads7= 038.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7038.yam= l b/Documentation/devicetree/bindings/iio/adc/ti,ads7038.yaml > > > new file mode 100644 > > > index 000000000000..37fbae95c8e6 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7038.yaml > > > @@ -0,0 +1,51 @@ > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/iio/adc/ti,ads7038.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Texas Instruments ADS7038 and similar ADCs > > > + > > > +maintainers: > > > + - Andre Werner > > > + > > > +description: | > > > + Family of 7 channel, 12 bit ADCs with SPI/I2C interface. > > > + > > > + Datasheet: https://www.ti.com/lit/gpn/ads7038 > > > + > > > +properties: > > > + compatible: > > > + enum: > > > + - ti,ads7038 > > > + - ti,ads7138 > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + spi-max-frequency: > > > + maximum: 60000000 > > > + > > > + vref-supply: > > > + description: Supplies the 2.5V or 5V reference voltage =20 > > > > I don't see that in the datasheet. It has AVDD and DVDD. =20 >=20 > Yes, that was a copy-and-paste error from another description used as > a template. >=20 > > > > Also, looks like there are GPIOs. Those aren't ever exposed to the OS? = =20 >=20 > Yes, you are right. This is a fundamental implementation of the driver > to support the chip family. I want to add further functionalities in > upcoming commits. > I wanted to get some feedback when the first steps are done to not > reinvent everything from the beginning if something is generally > wrong in the driver structure and the way I had used the APIs. Device tree binding should fully describe the hardware, not what the driver currently implements. So add the GPIOs for v3. >=20 > > =20 > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - vref-supply > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + spi { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + > > > + adc@0 { > > > + compatible =3D "ti,ads7038"; > > > + reg =3D <0>; > > > + vref-supply =3D <&refin_supply>; > > > + spi-max-frequency =3D <10000000>; > > > + }; > > > + }; > > > -- > > > 2.42.0 > > > =20 >=20 > Regards, >=20 > Andr=C3=A9