Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3654451rwr; Sat, 22 Apr 2023 09:04:52 -0700 (PDT) X-Google-Smtp-Source: AKy350YlVgr7PyUJG0zb5u3FyhvYLlFhJgmunor/m+ePciet+slTe7OUapaXbkyg/5bnvCPv6yYD X-Received: by 2002:a05:6a20:728a:b0:f1:c0a1:8035 with SMTP id o10-20020a056a20728a00b000f1c0a18035mr12268486pzk.0.1682179492280; Sat, 22 Apr 2023 09:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682179492; cv=none; d=google.com; s=arc-20160816; b=Be7JECxFMJqSZqRQiWRtGcMhdrFIRBMGbzQM4efuEBnGaww/Xz3PRHIOA/Oys1FRJq /s8muJWOZmu+cgaA7TmbZaOKxPXPjR6R4VAWV0DEQtpIeUDHq179rhPMKvGoweZPhoZw 1uwzW9p7oUEMWmRApQfS3l4Z2PZmiH4SjPw9O2LZKxRelao8vxPMuYvfCVkzjw4c5oeu 2JtEg9v8mpbU71WmxKq8ST9P6udyzBmtyMUD96VKwkd7FynVa1CIg9wK4hf1yhYe/71l pmgZwXAqhuzsE+jHzIDVgLCyLRpbc2NJxYRursDuGj1zBVZ8yoObUIamAlITAnBvP1p5 p7Dg== 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=fK4nOjj35Z4WJIb9AyAA66N/FZ6YeAi/wqENKbf6uPk=; b=yfpRO5tvMB0uMj+BbEz7n4USpfJXZFyOJM3n7h2qHy9gpKEfFjqpsHHN4ezzSundDg 02QJqe05FYnNJ6nlRoq8zWp39fX78V3y+cxfL15qlI9C8zANse/aIIZxf/Y4GLxwo6Ur K5/Cc4BhXrXvINhKtI3C0zmjYJdBIiMV0um9+Rl7SnjMVSw/biRjDYyCejS9GsuqNzNm joLQOt6Mc/mvF9tyPjxtWJOEueSMx7Kc3MR0Cj8oOo6d+JzXMvvK0J2yd3gt0gBOWOCt xnFVR28DdZkRlcpRz5KjNQgOqztdxR+3ExxrZ0Ba/jwzRRXctWIkmPPj8xVR50PG+PE2 vxxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GfcXZ350; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a6-20020aa795a6000000b0063d28a06b1asi7134585pfk.112.2023.04.22.09.04.20; Sat, 22 Apr 2023 09:04:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GfcXZ350; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229663AbjDVQCf (ORCPT + 99 others); Sat, 22 Apr 2023 12:02:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjDVQCd (ORCPT ); Sat, 22 Apr 2023 12:02:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B3151736; Sat, 22 Apr 2023 09:02:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2EFD1611C1; Sat, 22 Apr 2023 16:02:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C543FC433EF; Sat, 22 Apr 2023 16:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682179351; bh=PoumuO8WQwaap5HmG8pUFcuCsPm1QbWRabiXoQhhiFw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GfcXZ350PyHfmCKruGAr1cbbVQm6ouJBElpPWHRMs/48iKCGdS/SsXAErj6MZnwuZ aUG1WKCnkkqlbKOTikhQhwOjaQtN+OP/fn8Cz4YJapnZZnIU7EelWLfpPCuAHUP3su uyky8tEmMK5k3uZuwb6Zt/motVVHEE7QQ8xLERT4BLZAU7Wn7VBZcViJCcD02OayvM NNw7vIhy/eWJ78QL9TZ/F8RlQnMp5EqkofRMR1pHSKvKM/TkpFqkbSWI1N57glnnCX iHH1pKjYX3fNm6YJYkphKYg7IRRN5gRRbKABK9ck+TKGJDkAV9PQZuP036T4OUSLdl 3U75eCPr7Riwg== Date: Sat, 22 Apr 2023 17:18:07 +0100 From: Jonathan Cameron To: Herve Codina Cc: Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Christophe Leroy , Thomas Petazzoni Subject: Re: [PATCH v3 1/3] dt-bindings: iio: potentiometer: Add the Renesas X9250 potentiometers Message-ID: <20230422171807.510d7fa3@jic23-huawei> In-Reply-To: <20230421085245.302169-2-herve.codina@bootlin.com> References: <20230421085245.302169-1-herve.codina@bootlin.com> <20230421085245.302169-2-herve.codina@bootlin.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; 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,T_SCC_BODY_TEXT_LINE,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 On Fri, 21 Apr 2023 10:52:43 +0200 Herve Codina wrote: > The Renesas X9250 is a quad digitally controlled potentiometers. > > Signed-off-by: Herve Codina Hi Herve, Historically we've been a bit lax in IIO bindings in always making sure the per supplies are included. As a result we frequently get them added later and it just makes things messier than they should be. So please add vcc-supply from the start. V+ and V- are a little trickier. I was expecting datasheet to say they should be symmetric about 0 but it doesn't. So they could be two independent supplies. Also make it required as my current understanding is that we should do that for supplies that are definitely present even if we could rely on the fallback to regulator stubs if they aren't supplied. So add the 3 supplies to required as well. Less of a requirement, but you might want to also provide an optional gpio for the not WP pin on basis someone might wire it up to the host processor. Beyond the comment Krzystof made on iio.yaml this otherwise looks good to me. Thanks, Jonathan > --- > .../iio/potentiometer/renesas,x9250.yaml | 54 +++++++++++++++++++ > 1 file changed, 54 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml > > diff --git a/Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml b/Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml > new file mode 100644 > index 000000000000..dfa36b23eb0d > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml > @@ -0,0 +1,54 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/potentiometer/renesas,x9250.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas X9250 quad potentiometers > + > +maintainers: > + - Herve Codina > + > +description: > + The Renesas X9250 integrates four digitally controlled potentiometers. > + On each potentiometer, the X9250T has a 100 kOhms total resistance and the > + X9250U has a 50 kOhms total resistance. > + > +allOf: > + - $ref: /schemas/spi/spi-peripheral-props.yaml > + - $ref: /schemas/iio/iio.yaml > + > +properties: > + compatible: > + enum: > + - renesas,x9250t > + - renesas,x9250u > + > + reg: > + maxItems: 1 > + > + '#io-channel-cells': > + const: 1 > + > + spi-max-frequency: > + maximum: 2000000 > + > +required: > + - compatible > + - reg > + - '#io-channel-cells' > + > +unevaluatedProperties: false > + > +examples: > + - | > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + potentiometer@0 { > + compatible = "renesas,x9250t"; > + reg = <0>; > + spi-max-frequency = <2000000>; > + #io-channel-cells = <1>; > + }; > + };