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=-3.0 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 3066AC10F12 for ; Wed, 17 Apr 2019 06:43:53 +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 F08EE206B6 for ; Wed, 17 Apr 2019 06:43:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Cl35sBSJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F08EE206B6 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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nmDv+1q5ee5pU0dc8G6mv2cZ+9yn14vYeOGrNlJeeGA=; b=Cl35sBSJHTR/q/ElawmpiF6Qt 8x6J0ET69DX6Jf+BtcygjaD8xvwSm7v6jj78JtXDcYxjkFhCoXcKm/tXBh8l4sXlF0SCa7AJDC7Tq 0xiPOAV9o1pKcEmxEu4tWkZDKTqNqpcpW4k3tJZGzQj1MyUxmM7z8IqoZFDakY1tfZcedY9Y99uMX b8SwUmWXZDfhX4Tla3E5t6rl0UVLT/oVbuU8e3bYYSAeXSqRrovUk2n1Wv0I6zv1Uk4WS7bW3Yxab tXI54cPbTwWeBa2JBRCDP047zi9WeAcrZ+S4rrodM95wCkwpmSi2YcNjLeoy6mIQcf0TdKAzrE5JP TRVWJ1cZg==; 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 1hGeIO-0005dw-C3; Wed, 17 Apr 2019 06:43:48 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGeIL-0005dX-DK for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2019 06:43:47 +0000 X-Originating-IP: 90.88.160.238 Received: from localhost (aaubervilliers-681-1-42-238.w90-88.abo.wanadoo.fr [90.88.160.238]) (Authenticated sender: maxime.ripard@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 9A143C000D; Wed, 17 Apr 2019 06:43:38 +0000 (UTC) Date: Wed, 17 Apr 2019 08:43:38 +0200 From: Maxime Ripard To: Rob Herring Subject: Re: [PATCH 1/2] dt-bindings: sound: Convert Allwinner SPDIF binding to YAML Message-ID: <20190417064338.wuzjkixbg7noolwx@flea> References: <4060ec46117ccf3cd643b8f1b9759ed44d38c5e7.1555330005.git-series.maxime.ripard@bootlin.com> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_234345_598941_D0D18DD0 X-CRM114-Status: GOOD ( 19.27 ) 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: multipart/mixed; boundary="===============4551636563125464164==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4551636563125464164== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t6senhmj6w2pwdjy" Content-Disposition: inline --t6senhmj6w2pwdjy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Rob, On Tue, Apr 16, 2019 at 04:36:18PM -0500, Rob Herring wrote: > On Mon, Apr 15, 2019 at 7:07 AM Maxime Ripard wrote: > > > > The Allwinner SoCs feature an SPDIF controller across multiple SoC > > generations. > > > > However, earlier generations were a bit simpler than the subsequent ones, > > and for example would always have RX and TX capabilities, and no reset > > lines. > > > > In order to express this, let's create two YAML schemas instead of the free > > form text we had before. > > The only difference is 'reset' is required in one? Perhaps better to > just not make 'reset' required til we figure out how to handle a > conditional like this. Seems like we discussed this and I probably > said to split things? We indeed discussed this, and this was one of the solutions to support this. I wanted to get the discussion started as of how exactly we want to support this kind of construct. I looked it up a bit, and it looks like json schema 7 introduces conditionals that would allow us to deal with this nicely. https://json-schema.org/understanding-json-schema/reference/conditionals.html Is that something we can switch to while we have not a lot of schemas, or would that require some significant work? > I guess it's a judgement call depending on how different things are. > > Possibly, we could handle this case like this: > > allOf: > - $ref: allwinner,sun4i-a10-spdif.yaml > > properties: > resets: > maxItems: 1 > > required: > - resets > > > Plus we'd need the 'allwinner,sun6i-a31-spdif' and other compatibles > in both files. Note that you can't use 'additionalProperties: false' > in either file in this case. > > I don't really love this solution though. Yeah, I'm not a big fan of it either. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --t6senhmj6w2pwdjy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLbLGgAKCRDj7w1vZxhR xRGAAP0U23WPhLTRpZ+eW+5Wzh7YCHPRMtHNG1jIeLxH0gqA/AEA1MyB95x5ranG LwOVx9QR2/eNwj5DqTrEMGZrQCLJGgA= =Zr3Z -----END PGP SIGNATURE----- --t6senhmj6w2pwdjy-- --===============4551636563125464164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4551636563125464164==--