Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp2387223rwl; Sat, 5 Nov 2022 06:13:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6K/qTG4UfeR0+iZzMX2peqCnMPY0kJteJW0vKk9jMZBCDQUJLDS9PwiUM2Gw8/hYXUMWrM X-Received: by 2002:aa7:c417:0:b0:463:3f0c:be12 with SMTP id j23-20020aa7c417000000b004633f0cbe12mr33479710edq.35.1667653988266; Sat, 05 Nov 2022 06:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667653988; cv=none; d=google.com; s=arc-20160816; b=UfIhiFyX8ieW8zAfjRlP3wQ8W0d5NAEm6OPg8l3ms29VkxXOPyGaNyrpVsjfOpcRDm 72Ax8rF880OjjAC8TqSXh9aWxOpRqP7oEvhyTPLhVjI9Lzgp4R2AeVob72UY+HkxIXK5 +Rk2gEm+a/zucwB76NMM9T8I7sFjGJyiC5wujw6vrD22eWTrmXfGfxDaPOsDmRV7CuBj tn1av274hlB94xEE6/lsRmQW1IuHBw4dJeAGtjM82c97qHBNtYZSS7hr/TQv5OQl6XRA X2fdt+ISwYhnnqHu+kB06m5Hk1qlBfwVSryXOhpz0uYz8LyVbLzd1A+3lTpApC1O4g38 iK2g== 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=9VYTBGbOV3+05cjTl1ZfOfLhQXHM4FTexIvrC0+koDM=; b=t66SKPp+tpidF3/ghzNbtiWBeyEvySM3UrUg64RQqJ2TA6VffWJlfK4NjHosiMGeOR gTv7OMGWNcVCgpnO4WvUGmGsxGFZ+yjyB5ZXNSjsPKB4ogQtV19HTlE2JhwXXu19+mCk zMzSiJfxdTUdgMYDJDpcLyMHtSA0hs8Dmqof8Yz5ZTPhtaaqDDEi/T0uYj1YYncwRuor 2arLvMe5XK3rHG2R3dZE7PiTdAMy3wb50nDfFMZEAvrRhVKQ6g+PP4sYcLnT+Q6XEsPr 6vzDOv/eHrE7APB4vi+2Ro1GIn3gwS0DvyTYnxGm4Dn8T+MeYplFB3J+ILv2Pkb5R+Sn 9hyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jkhHZzXr; 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 dr7-20020a170907720700b0078e27f2ef4bsi2542807ejc.956.2022.11.05.06.12.28; Sat, 05 Nov 2022 06:13:08 -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=jkhHZzXr; 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 S229589AbiKEMzT (ORCPT + 97 others); Sat, 5 Nov 2022 08:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiKEMzS (ORCPT ); Sat, 5 Nov 2022 08:55:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5E427CD2; Sat, 5 Nov 2022 05:55:18 -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 9FC8B60B3F; Sat, 5 Nov 2022 12:55:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04260C433C1; Sat, 5 Nov 2022 12:55:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667652916; bh=3vT+neZXkQLSyBK55o+F5Gw2VXJGt/NQfSDibrgT40g=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jkhHZzXrJxBP20g7sx9Lqo+m9wm6Oted71cz4Mppw7DBk2iRwqrE0+qHmFLiODVHe h8x/FK43yqo3gNoZqPM+Vc8P/K5xvtNAl2eyyJf7nDjtFLKTab9bxIQzHBx8DUK/u8 s63YCHysJBXYjO3pyWm3hmF3TxABJ51mBR/HooJ8rJZxDclbMCjk2gqN/dzBBhO3M6 LqV/gSMhpoLUJy2ms7xU16grNbL+TcnPkz2DaSHDsYjBL0tYi7FHCPIGuNmMtXEr2N sVVNkhDhgbKRS4TWHSI2qqA/RD3Vtr7S18i6b69+GVDV2YGTvP8XncXvElEeIOcvf8 LmIN+0dzdQYgw== Date: Sat, 5 Nov 2022 12:55:10 +0000 From: Jonathan Cameron To: Ciprian Regus Cc: , , , , Subject: Re: [PATCH v2 1/2] dt-bindings: iio: dac: add adi,ad5754.yaml Message-ID: <20221105125510.313f2037@jic23-huawei> In-Reply-To: <20221104172343.617690-2-ciprian.regus@analog.com> References: <20221104172343.617690-1-ciprian.regus@analog.com> <20221104172343.617690-2-ciprian.regus@analog.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; 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=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, 4 Nov 2022 19:23:42 +0200 Ciprian Regus wrote: > Add devicetree bindings documentation for the AD5754 DAC driver. > > Signed-off-by: Ciprian Regus Hi Ciprian, To add to Krzysztof's detailed review, a request for a bit more variation in the example. > --- > changes in v2: > - dropped "device driver" from the title. > - added the vendor prefix to the 'output-range-microvolt' property. > - fixed example indentation (4 spaces). > .../bindings/iio/dac/adi,ad5754.yaml | 182 ++++++++++++++++++ > 1 file changed, 182 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..4c9c5ba90931 ... > +patternProperties: > + "^channel@([0-3])$": > + type: object > + 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 > + ... > +examples: > + - | > + #include > + > + spi { > + status = "okay"; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + dac@0 { > + compatible = "adi,ad5754r"; > + reg = <0>; > + spi-max-frequency = <1000000>; > + spi-cpol; > + > + clr-gpios = <&gpio 25 GPIO_ACTIVE_LOW>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + channel@0 { > + reg = <0>; > + adi,output-range-microvolt = <0 5000000>; > + }; > + channel@1 { > + reg = <1>; > + adi,output-range-microvolt = <0 5000000>; Nice to have rather than necessary, but maybe the example could include a few different options from those available for this property? > + }; > + channel@2 { > + reg = <2>; > + adi,output-range-microvolt = <0 5000000>; > + }; > + channel@3 { > + reg = <3>; > + adi,output-range-microvolt = <0 5000000>; > + }; > + }; > + };