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 X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFEE9C04A6B for ; Fri, 10 May 2019 10:26:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A0D352175B for ; Fri, 10 May 2019 10:26:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="U8/jaZhB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0D352175B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=ZLooCgqoJ33tHdMTcAjrK0hknqG6v5EPOxW8jM89WSc=; b=U8/jaZhBofrTkn Ijo9/McN3e6SBEn97W+Jox6vUtSQFlRUoz45RvMMl1GLlmafyHxZUv3MAoy/V5E8BdpMGL4XhmZh/ BOloRPjL/pYqKVXGz1K2KW5WIE2nvdnL7cCSLt7sz2NYSBU864/mgzzeW+EdofU86tA1ab1huQMMO PjwV4bYT5uEMR33QeUuwbjJJbKbaFWLK/n1HJlEmTkBqMsJ7HD7hEWfWJrdVeuUYQ0bY+V+UKEclQ cj950N45mjJHkV5MSTHLx6HRNpKn5lG4CZC49ZzqX219xNYNL+QyGP+sFGkzztmrmkz0LGNLLvoNE jzYxEwhrj3hsKRSgR6dA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP2jn-0004BQ-Qp; Fri, 10 May 2019 10:26:47 +0000 Received: from relay12.mail.gandi.net ([217.70.178.232]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP2jk-00049y-46 for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2019 10:26:45 +0000 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DF1B520001C; Fri, 10 May 2019 10:26:28 +0000 (UTC) Date: Fri, 10 May 2019 12:26:28 +0200 From: Maxime Ripard To: Rob Herring Subject: Re: [PATCH v2 2/2] dt-bindings: sound: sun4i-spdif: Document that the RX channel can be missing Message-ID: <20190510102628.u344cqe7sftuamfg@flea> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190510_032644_318312_23081CB5 X-CRM114-Status: GOOD ( 15.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Linux-ALSA , Liam Girdwood , Chen-Yu Tsai , Mark Brown , Frank Rowand , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Rob, On Wed, May 08, 2019 at 02:35:10PM -0500, Rob Herring wrote: > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: allwinner,sun8i-h3-spdif > > + > > + then: > > + properties: > > + dmas: > > + maxItems: 1 > > In this and below, these should get added automatically by > fixup_schema. If not present, we set minItems/maxItems to the size of > the items list. It look like you added support for that, so left over > from before you addressed that for if/then/else? Sorry, I should have brought that up in the pull request. It seems that it's still necessary when using allOf, otherwise the schema won't match Maybe there's something more to fix when using allOf? > > + items: > > + - description: RX DMA Channel > > s/RX/TX/ > > > + > > + dma-names: > > + maxItems: 1 > > + items: > > + - const: tx > > + > > + else: > > + properties: > > + dmas: > > + minItems: 2 > > + maxItems: 2 > > + items: > > + - description: RX DMA Channel > > + - description: TX DMA Channel > > + > > + dma-names: > > + minItems: 2 > > + maxItems: 2 > > + items: > > + - const: rx > > + - const: tx > > I'm really on the fence whether it's worth it to add all this just add > the restrictions based on the compatible. I guess with copy-n-paste > this would be a common error. Converting most of the bindings to the schemas has shown that (at least in our case), we've been pretty bad at keeping the documentation up to date with that kind of information. Adding that kind of construct at least has the benefit to actively enforce that the documentation is complete. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel