From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA854C52D6D for ; Sat, 3 Aug 2024 10:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AssSCeqd7rUjIxZ0fZLyO0JTPDIYDU04anuhrTwvdh8=; b=drp3wJOyTZXYcU paVry2b+e7ZCNz+nnzpKch2EwcYQVdMlaCSGF+FF3S6RbK9cq60wKSb5btRVrXM2MVA9bw1MAImRX Z1PBmO16u+qB3MkKAaKFxg3pDcpgrWZEFa2b7Fb2tVfcfwFiXQHNlEr2HuhJAfdQx47UyFakfstFs b6J1ulT8ZfDmGbrhhSO9dzZnT3LPSbhfPMnJpfMPlhtS4IDqQCjsRzSUD8XTc6LVkNkBrhfHohnYk rIysN0/UMLqg5bcnmKMbKNfg1xx2fa3IBIfmrNu3JNxTn4SXOHd9rZX3d1x770NtjbjzMsqq6XM5w P9PWHRNkwCjPXiiFW4VQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1saCBH-0000000BD4p-2Wfc; Sat, 03 Aug 2024 10:40:11 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1saCBE-0000000BD4J-48CS for linux-riscv@lists.infradead.org; Sat, 03 Aug 2024 10:40:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id D0A266230D; Sat, 3 Aug 2024 10:40:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A5C1C116B1; Sat, 3 Aug 2024 10:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722681607; bh=ty1lvCzRcfP3px8gHvkWz0iOMc8sRwThm1AFIKF/IVc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pVee2Pn2fvtcvRa/Ij9Rd1q+cTJPD970Y62CiyUSID2kcAAck1f4lTKxj5JcCl5/9 qWl5ToA0XL1Pz1Rhg+xttrxZa6mm9f784SlFzHwm3BTETJOkVsVDk6HTRltBGiZi4Z ncsv63E4H7Pb2ZjkkH9p8hNCRkWBnAfgghhzTPesX8VKJWhu014xU2PiXDs2ho5ylM 10kigJx6wrMBC9YSNMEEHLRxzIJOhi96LJWyeknNuIMIHUSBdncuG+JullpykL2UNs fEyDmuN0G/bNcSl+r1wGl3tYO2YnesPN3SMnPDBVCOEzd5/CkZOZh/Vfcm7lfAVkcF bCXj434nBhzLw== Date: Sat, 3 Aug 2024 11:39:59 +0100 From: Jonathan Cameron To: Krzysztof Kozlowski Cc: Thomas Bonnefille , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Thomas Petazzoni , =?UTF-8?B?TWlxdcOobA==?= Raynal , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 1/3] dt-bindings: iio: adc: sophgo,cv18xx-saradc.yaml: Add Sophgo SARADC binding documentation Message-ID: <20240803113959.12aa0c4a@jic23-huawei> In-Reply-To: <368cc5a8-3ec1-4e91-ae1d-59068f25d8e0@kernel.org> References: <20240731-sg2002-adc-v3-0-5ac40a518c0a@bootlin.com> <20240731-sg2002-adc-v3-1-5ac40a518c0a@bootlin.com> <368cc5a8-3ec1-4e91-ae1d-59068f25d8e0@kernel.org> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240803_034009_197040_E05D7E2A X-CRM114-Status: GOOD ( 25.54 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, 31 Jul 2024 15:57:27 +0200 Krzysztof Kozlowski wrote: > On 31/07/2024 14:24, Thomas Bonnefille wrote: > > The Sophgo SARADC is a Successive Approximation ADC that can be found in > > the Sophgo SoC. > > > > Signed-off-by: Thomas Bonnefille > > A nit, subject: drop second/last, redundant "binding documentation". The > "dt-bindings" prefix is already stating that these are bindings and this > is documentation. Cannot be anything else. > See also: > https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > > > > --- > > .../bindings/iio/adc/sophgo,cv18xx-saradc.yaml | 48 ++++++++++++++++++++++ > > 1 file changed, 48 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/sophgo,cv18xx-saradc.yaml b/Documentation/devicetree/bindings/iio/adc/sophgo,cv18xx-saradc.yaml > > new file mode 100644 > > index 000000000000..79d8cb52279f > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/adc/sophgo,cv18xx-saradc.yaml > > @@ -0,0 +1,48 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/adc/sophgo,cv18xx-saradc.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: > > + Sophgo CV18XX SoC series 3 channels Successive Approximation Analog to > > + Digital Converters > > + > > +maintainers: > > + - Thomas Bonnefille > > + > > +description: > > + Datasheet at https://github.com/sophgo/sophgo-doc/releases > > + > > +properties: > > + compatible: > > + oneOf: > > Drop > > > + - items: > > Drop, use const directly. > > > > + - const: sophgo,cv1800b-saradc > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > + > > +required: > > + - clocks > > + - compatible > > + - reg > > Odd order. compatible is always first. Anyway, list here has the same > order as "properties:". > > > + > > +unevaluatedProperties: false > > I don't see any other $ref. Don't you miss adc.yaml? Or channels? Or > some more properties? This looks incomplete for ADC. It's acceptable on ADCs in particular (but more generally) to just assume all channels are exposed. They may all be wired to internal power lines anyway, in which case what is there is a chip feature. This only works if their isn't any channel specific configuration, then not providing the channels child nodes is fine. However, that requires us to be fairly sure there won't ever be a per channel thing that needs configuring from DT. That's generally only the case in simple devices. So might be better to put the channels nodes in there and deal with dynamic channel configuration (so don't present any without a channel node) from the start as it's more future proof. > > > + > > +examples: > > + - | > > + #include > > + #include > > + adc@30f0000 { > > + compatible = "sophgo,cv1800b-saradc"; > > + clocks = <&clk CLK_SARADC>; > > + interrupts = <100 IRQ_TYPE_LEVEL_HIGH>; > > + reg = <0x030F0000 0x1000>; > > Hex is *always* lower case, see DTS coding style. > > Order the properties correctly, so again, please read DTS coding style. > > > + }; > > > > Best regards, > Krzysztof > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv