Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1798309rdh; Sat, 25 Nov 2023 03:37:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFq8B8TNqSpb1e+fIO1wfCxFdmNfvKSbFHEjYnFGFYak+lG2aDvXaM7BxqrT9zS/GNcnEBg X-Received: by 2002:a17:902:ab0f:b0:1cf:6453:b27a with SMTP id ik15-20020a170902ab0f00b001cf6453b27amr5180268plb.12.1700912250349; Sat, 25 Nov 2023 03:37:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700912250; cv=none; d=google.com; s=arc-20160816; b=vHfPyCJ7E8eGeM0ASAqa3xP9wtMweMWhD3Gw9rZxUS+i+WRl0gH31TqnJ5OQwpsRpt 8vjBmlNP3r+Z1cdJlME1J5axyAte5A6Px2kjOEq8KgJVw2J4paMluBoEK0pT7pxfg3+b /ur9mQRxc5UFTvzNkz2i3tItBEgzmC9bgUMhyi/Y+rkHVyFXQO2z4bh2BSM8+Q2jAF2u b4LSnIQ69LE7hELm6cMLxnoseVvD3Z7gpkphNa6PgCj0q/i6CJH0EPs42mdiFi73gXg4 C25SSsxZeSfIyThCI/T/e+/bOo6piDOpbJyO1FTDQLn+n3YSOhVg042c9v5NL0flP8dN FdOA== 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=YXe5+nFDXdz9Z0xfGXUn+3cgOWsQuyOBIBVXuC8MyYk=; fh=2nQBOaBKhnW+Uhdrbg+UgbquIOi0h7n5f/qQeD6NClQ=; b=m3SLiIadtH8OFqmdufEa30AvmJKOW9ja3dC4VmgUomf+hD3qvHra0qEwEpUHYxPltU oJvzzSiy6USQx27d6MObhOiEbLykxdXEeuqiLyIAYAzULe0AnNrSXX6/DM3jEM3SjY5n UUciY8AsX28+A4heP5fZ3bx3/vDGfCpFCat8aTxpaA04Ec4GgSZpFTnnS2qmv0aMfPYG CCLsWr5l6b/+yrjrQz/aQ14pObL2ombS/O9Z/vgy663yNLcTw1NGizthtZFQEOpcYisW pOOe/47WQIOKDKA4QodCm3Z188feo6AZ29Ufp54NYDFxwledjWKcKKddhaZGKC5LoyCu eIVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pZxw/pfQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id n17-20020a170902d2d100b001cf7ce5e6cesi5550638plc.417.2023.11.25.03.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 03:37:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pZxw/pfQ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id BCD4880A1340; Sat, 25 Nov 2023 03:36:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231967AbjKYLgU (ORCPT + 99 others); Sat, 25 Nov 2023 06:36:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjKYLgR (ORCPT ); Sat, 25 Nov 2023 06:36:17 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F38DD41 for ; Sat, 25 Nov 2023 03:36:24 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4989AC433C7; Sat, 25 Nov 2023 11:36:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700912183; bh=aCwCQvlfp9RlSvy/8J0HTVolXv3WTuhEcuknlDUIbko=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pZxw/pfQvVAlZYNi2K0gVG5mHhMKiATOenG9idjwmEqla54ee+Dajv1wLTV7OlNup /KkLSouuwAwxp2jQljbURTM2EDN5gqsZ1Ixi6ewNOF3nogJQZ7mb/IJ3J3aJORex6D /b4Rpg9P6n/FECD4vMXelSwFffToD1cFcqh17e5oMgGGk2uIDNobxnAgBIDWlr32EE EJcGDxM1LHdx6JKOrDJPNqatQaTiOAsspLKCwa6v/9g0SjglExjMgMEa2AMFviF3+F 2O4f+3jeTMkRgdyACtsaCJWll3p7rKUXpmKWX2B+hhNittRpNuZdlaq5HKs9hbon6x C0eidqIl4PGow== Date: Sat, 25 Nov 2023 11:36:17 +0000 From: Jonathan Cameron To: Anshul Dalal Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan Subject: Re: [PATCH 1/2] dt-bindings: iio: dac: add MCP4821 Message-ID: <20231125113617.4d626bb2@jic23-huawei> In-Reply-To: <20231117073040.685860-1-anshulusr@gmail.com> References: <20231117073040.685860-1-anshulusr@gmail.com> 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=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Sat, 25 Nov 2023 03:36:45 -0800 (PST) On Fri, 17 Nov 2023 13:00:37 +0530 Anshul Dalal wrote: > Adds support for MCP48xx series of DACs. > > Datasheet: > [MCP48x1] https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf > [MCP48x2] https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf > > Signed-off-by: Anshul Dalal Hi Anshul, Usually we mark vdd-supply as required given I guess device doesn't work without a supply. Obviously we don't actually have to provide it in a binding if the supply is always on and we are fine with a stub regulator being provided by the regulator subsystem. There was some discussion about this a while back and conclusion was mark them required in bindings anyway. We haven't yet updated this in all the older IIO bindings and it's a minor thing, but given the build warning on patch 2 you are going around again so might as well tidy that up! Jonathan > --- > .../bindings/iio/dac/microchip,mcp4821.yaml | 63 +++++++++++++++++++ > 1 file changed, 63 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.yaml > > diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.yaml > new file mode 100644 > index 000000000000..904de15300bd > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4821.yaml > @@ -0,0 +1,63 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4821.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip MCP4821 and similar DACs > + > +description: | > + Supports MCP48x1 (single channel) and MCP48x2 (dual channel) series of DACs. > + Device supports simplex communication over SPI in Mode 0,1 and Mode 1,1. > + > + +---------+--------------+-------------+ > + | Device | Resolution | Channels | > + |---------|--------------|-------------| > + | MCP4801 | 8-bit | 1 | > + | MCP4811 | 10-bit | 1 | > + | MCP4821 | 12-bit | 1 | > + | MCP4802 | 8-bit | 2 | > + | MCP4812 | 10-bit | 2 | > + | MCP4822 | 12-bit | 2 | > + +---------+--------------+-------------+ > + > + Datasheet: > + MCP48x1: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf > + MCP48x2: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf > + > +maintainers: > + - Anshul Dalal > + > +properties: > + compatible: > + enum: > + - microchip,mcp4801 > + - microchip,mcp4811 > + - microchip,mcp4821 > + - microchip,mcp4802 > + - microchip,mcp4812 > + - microchip,mcp4822 Whilst I understand the reasoning of keeping these grouped by number of channels, I'd still rather see them in numeric order here and probably also in the table above. Given that grouping by resolution rather than channels would also be a valid choice, I don't see a strong reason to keep them out of order. Also, manufacturers often get creative with numbering (when they run of out of digits for example - maybe they'll do a 16 channel variant one day and then be stuck) so trying to group things is often a loosing game long term! Jonathan >