Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7709864rwb; Wed, 23 Nov 2022 09:43:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf75NhDswteucoXHWoAgrDIuqZpgCrJL2w8YdPGwAOentpi01tfsYD3BAYhC/gtZr4OJUd0k X-Received: by 2002:a17:906:30c1:b0:7b7:eaa9:c1cb with SMTP id b1-20020a17090630c100b007b7eaa9c1cbmr9632733ejb.745.1669225385847; Wed, 23 Nov 2022 09:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669225385; cv=none; d=google.com; s=arc-20160816; b=qfM4wKgVCfM6BkO8i5vR0nAjxJ/5nKIvMbMZTmLAbG+kl6M97ivPfHII6KO4VfyLEX TpQGOMpUMWGqy5Au0myyrNGzg/hKJ3qlRkt2ekMs6alcbxykJpKr94gWu+oEbiQ4cGDk Uy9+PLq3k2EA6vJw4nEYEeDt0Bqd2n0U3yYrgsbH7GdhEKSYeji7fjky5BNErYMkHtGD a8VZNyiWNl4cu1reG8DE5GehjzmuMy/4O7He3fvRylSIKFDwlYv0ZK3FFh37CM4pTiFt qXxzBgGp7HcJ0NY1JASGoou6ZweWaO59c/IVEtYowuspGRNumJnVkRGES+Gvws5SaCFC 9CQQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=Vv8FiBxMOcBG1W4LeJqw8zhtLdp8C9Sc7qO8dfPZxfM=; b=UttuJ+bLOUfHmqjKrc0ULeH0Y/JWGrQODpsAGx8h+WgswFVseK1Hl6kCtAypZ1hhQ3 Y4mRiUbLYwH5tueMT7ue00llw2GiBGBWTYdfoXZe0/X0UQtQWhtdQ7f4sW4L16XIzJi4 e8ICgqEnuXYaGuBxgKMaudmUxg7PEowKI9lTYdJH7EfRasK5RjI/va1CyU/2IIrZJQeo gCifkWP4SwfL8z46c+NWKiysvup/iZD2l3rhYJMk3gfKVTc5GLPPGbO6TBFMgRFCss3O 8+B1c8u7jAJYOP65K500d/T5+2UmfVaniTJ+RGjjbuIeimZll20daUV3TIcgIOj3I0O+ clXg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t35-20020a056402242300b0046197a8b7a1si14110295eda.485.2022.11.23.09.42.41; Wed, 23 Nov 2022 09:43:05 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238557AbiKWR3U (ORCPT + 89 others); Wed, 23 Nov 2022 12:29:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238688AbiKWR3K (ORCPT ); Wed, 23 Nov 2022 12:29:10 -0500 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9B4A8E08F; Wed, 23 Nov 2022 09:29:05 -0800 (PST) Received: from fraeml737-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4NHShp6mVZz67dbJ; Thu, 24 Nov 2022 01:26:18 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by fraeml737-chm.china.huawei.com (10.206.15.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 23 Nov 2022 18:29:03 +0100 Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 23 Nov 2022 17:29:02 +0000 Date: Wed, 23 Nov 2022 17:29:01 +0000 From: Jonathan Cameron To: Krzysztof Kozlowski CC: Ciprian Regus , , , , , , Subject: Re: [PATCH v3 1/2] dt-bindings: iio: dac: add adi,ad5754.yaml Message-ID: <20221123172901.00002918@Huawei.com> In-Reply-To: <24e8464a-923d-cd0f-c681-fc6ca3a5ad59@linaro.org> References: <20221118172407.765423-1-ciprian.regus@analog.com> <20221118172407.765423-2-ciprian.regus@analog.com> <24e8464a-923d-cd0f-c681-fc6ca3a5ad59@linaro.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.227.76] X-ClientProxiedBy: lhrpeml100003.china.huawei.com (7.191.160.210) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 Mon, 21 Nov 2022 12:20:39 +0100 Krzysztof Kozlowski wrote: > On 18/11/2022 18:24, Ciprian Regus wrote: > > Add devicetree bindings documentation for the AD5754 DAC driver. > > > > Signed-off-by: Ciprian Regus > > --- > > changes in v3: > > - added additionalProperties: false to patternProperties > > - dropped status in the example. > > - added different values for adi,output-range-microvolt in the example. > > Negative values cannot be set since that will create a dt_bindings_check error. > > .../bindings/iio/dac/adi,ad5754.yaml | 181 ++++++++++++++++++ > > 1 file changed, 181 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml > > > > diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml > > new file mode 100644 > > index 000000000000..de0f6fab82b8 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml > > @@ -0,0 +1,181 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/iio/dac/adi,ad5754.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Analog Devices AD5754 DAC > > + > > +maintainers: > > + - Ciprian Regus > > + > > +description: | > > + Bindings for the AD5754 and other chip variants digital-to-analog > > + converters. > > + > > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD5724_5734_5754.pdf > > + https://www.analog.com/media/en/technical-documentation/data-sheets/ad5722_5732_5752.pdf > > + https://www.analog.com/media/en/technical-documentation/data-sheets/ad5724r_5734r_5754r.pdf > > + https://www.analog.com/media/en/technical-documentation/data-sheets/AD5722R_5732R_5752R.pdf > > + > > +properties: > > + compatible: > > + enum: > > + - adi,ad5722 > > + - adi,ad5732 > > + - adi,ad5752 > > + - adi,ad5724 > > + - adi,ad5734 > > + - adi,ad5754 > > Keep the list sorted. > > > + - adi,ad5722r > > I would even suggest sorted entirely, so 5722r follows 5722, but I don't > mind some combo-sorting (logical + alphabetical). I was curious about this as well, so went digging. Wonderfully they are grouped by logical set here - with each group of 3 being on a different datasheet (visible datasheet names above), with associated commonality. Still I'm fine with whatever ordering makes sense. Maybe it's just easier to smash them into simple alphabetical order both here and in the driver and not worry about where the order comes from. If doing that, make sure you also do it for the sub lists below. > > > + - adi,ad5732r > > + - adi,ad5752r > > + - adi,ad5724r > > + - adi,ad5734r > > + - adi,ad5754r > > + > > + reg: > > + maxItems: 1 > > + > > + spi-max-frequency: > > + maximum: 30000000 > > + > > + spi-cpol: true > > + > > + vref-supply: > > + description: > > + The regulator to use as an external reference. If this is not provided, > > + the internal reference will be used for chips that have this feature. > > + The external reference must be 2.5V. > > + > > + clr-gpios: > > + description: DAC output clear GPIO (CLR pin). If specified, it will be set > > + to high during probe, thus allowing the DAC output to be updated. > > + maxItems: 1 > > + > > + '#address-cells': > > + const: 1 > > + > > + '#size-cells': > > + const: 0 > > + > > +patternProperties: > > + "^channel@([0-3])$": > > No need for (). > > > + type: object > > + additionalProperties: false > > + description: Configurations for the DAC channels > > + > > + properties: > > + reg: > > + description: Channel number > > + maxItems: 1 > > + > > + adi,output-range-microvolt: > > + description: | > > + Voltage range of a channel as . > > + oneOf: > > + - items: > > + - const: 0 > > + - enum: [5000000, 10000000, 10800000] > > + - items: > > + - const: -5000000 > > + - const: 5000000 > > + - items: > > + - const: -10000000 > > + - const: 10000000 > > + - items: > > + - const: -10800000 > > + - const: 10800000 > > + > > + required: > > + - reg > > + - adi,output-range-microvolt > > + > > +allOf: > > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > > + > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - adi,ad5722 > > + - adi,ad5732 > > + - adi,ad5752 > > + - adi,ad5722r > > + - adi,ad5732r > > + - adi,ad5752r > > + then: > > + patternProperties: > > + "^channel@([0-3])$": > > No need for (). > > > + type: object > > + properties: > > + reg: > > + description: Channel number > > + enum: [0, 1] > > + > > + - if: > > + properties: > > + compatible: > > + contains: > > + enum: > > + - adi,ad5724 > > + - adi,ad5734 > > + - adi,ad5754 > > + - adi,ad5724r > > + - adi,ad5734r > > + - adi,ad5754r > > + then: > > + patternProperties: > > + "^channel@([0-3])$": > > No need for (). > > > + type: object > > + properties: > > + reg: > > + description: Channel number > > + enum: [0, 1, 2, 3] > > + > > > Best regards, > Krzysztof >