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.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,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 64FCFC282DA for ; Wed, 17 Apr 2019 18:22:49 +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 3138920674 for ; Wed, 17 Apr 2019 18:22:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ALPHCX7f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3138920674 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=lBtmLAsm6nwfuN8P5tjVA6/FytWjzj00B0XNmKKSgrw=; b=ALPHCX7fCMsiNv+Tre7U2kH/k 7jXuvVKUiD/2+a6TPqhr8ivkmrUYyLeUXjWr+Y53nlQHVrhVSz+sXl0vj/nMoMoOqGt9x7dA3IdjM g7aWkVdy48Bwo5So2EBN+y6wQLsmxOIUu5gN6dCvBpgDxFWE9AXI2vJptOwlZod5Zj6vaB5pa0Ao/ TIFjQwUc6k7DvIarBYnT+b5PkRPp4g2L+dN4Ni33WRiACmjqydIh1joU6Dbxf26mB8dwP1q5rpB5g lGC3jMr13klialYUd6Io6K4w405uegNKrfBl9fUb+2L1UuurFpg7HW44XDe02eRsfhb39qW4JMsuH i0HTDiprA==; 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 1hGpCi-00018Q-HW; Wed, 17 Apr 2019 18:22:40 +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 1hGpCf-000181-Fs for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2019 18:22:39 +0000 X-Originating-IP: 90.89.68.76 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E082DC0006; Wed, 17 Apr 2019 18:22:29 +0000 (UTC) Date: Wed, 17 Apr 2019 20:22:29 +0200 From: Maxime Ripard To: Rob Herring Subject: Re: [PATCH 1/2] dt-bindings: sound: Convert Allwinner SPDIF binding to YAML Message-ID: <20190417182229.ih4c76zlktoz43no@flea> References: <4060ec46117ccf3cd643b8f1b9759ed44d38c5e7.1555330005.git-series.maxime.ripard@bootlin.com> <20190417064338.wuzjkixbg7noolwx@flea> 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-20190417_112237_886575_849AD9AB X-CRM114-Status: GOOD ( 23.12 ) 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="===============1240814916174229661==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1240814916174229661== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tefkikc4bxoaaatp" Content-Disposition: inline --tefkikc4bxoaaatp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On Wed, Apr 17, 2019 at 11:04:22AM -0500, Rob Herring wrote: > On Wed, Apr 17, 2019 at 1:43 AM Maxime Ripard wrote: > > 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? > > We need check if the json-schema library supports this yet. I think it > should as there was an issue for it which is closed now. Apparently, it's supported since 3.0.0, that got released on the 24th of february. I mass converted the yaml-bindings code to use the draft 7, and the tests are passing (and a dtbs_check run seems legit too). So that went smoothly... > We'll then need to update the meta-schema and maybe the schema fixups > to handle this case. ... except that after adding if, then and else to the meta-schemas, a schema using that construct doesn't do anything (well, anything more than what it is doing without if / then / else). Apart from the fact that it doesn't work as expected (yet), the syntax is pretty elegant, so I guess we should go for that. > We should have a test case in the library too. > Test cases are important given that if you get schemas wrong, the > result is silence. ACK Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --tefkikc4bxoaaatp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXLdu5QAKCRDj7w1vZxhR xYlgAP97IqVF5fO1aPEzM1HFWtt8n6MTmx0022LTZi37wna52AEA1qrL1/YURm5l mRRl+31fa94EWSCcqxm7arPTopF0Iwk= =gP91 -----END PGP SIGNATURE----- --tefkikc4bxoaaatp-- --===============1240814916174229661== 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 --===============1240814916174229661==--