Received: by 10.192.165.148 with SMTP id m20csp491219imm; Fri, 20 Apr 2018 10:00:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/29+sH4H7vtzdPHLf+Oet+aAWP3stjBtz1rGxZJzXyNdgHTaXsuHVZBi3SJcaEeZ6EqVA5 X-Received: by 10.98.96.135 with SMTP id u129mr6646049pfb.141.1524243654834; Fri, 20 Apr 2018 10:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524243654; cv=none; d=google.com; s=arc-20160816; b=p3J1Crn9Ju+h50+zwKlrnWU6Q7KRFOe9QZ5noBpe03di4LTsZmql79bnEI9n35FwYk CwAMjaEhSv1+88IunVfMyqnEdUJsyUcS2QYMG+d6tJEs6dO2dYTxQ0YA1iUcQDhCRHcH Xmob5xnNKnmOuLCa3D1YS58N/3IzapaDhK+kbnnJFkHO8NadCda5TNbVh8bNE1PYX/cu czPFQrY4b7i6KXiJxfixqXReD/KNEdevBtrPX/lotKiU2Kd8EO/NcOY+v4Y1eQivi3sE mY5TK+FpghQBjmD0cwL/NxeHnbhu7t+0w9xrgjxCq6TyO4+e6Hc6L8LMiKKx2XVcDsuA JMkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=LZAxssNadHLU+Fq6meIZTWBT9mAswR4iqEMm8OBnbGA=; b=WmwoWhtAD0S9q5lcYw7E6961PiFr/qhwrirRqMHG8w5Vw5cb2o4xb7ja6ofKtTjV+Q eaY1VYpcbRSBHsl6yb+Af923EdM+1MNx3+pvoVgv4Xrm5oKdtO8Y97yxSHkjMhtxqY7x pUEcGEt/LIqih/9AueoniwNGbnsKYQQh9c2HgI8tWR5CHR78l0/1OUxi4Unf2Yqw2sv1 OUN+6eTv5ecdljLsAC1lx/UzIqUzHgPSpXe0+4ZgeH5iTO8qsRYv9MQqjIUXoN0f8RAe uAS63UiGzy/y7HJLS3l0vHJpV+bvIlBQe3XgsKoe/9uHj8s448iDApWbWbUlkGPaUVMF LM1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=rU0RRG3E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10-v6si5296572pli.419.2018.04.20.10.00.38; Fri, 20 Apr 2018 10:00:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=rU0RRG3E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753340AbeDTQ70 (ORCPT + 99 others); Fri, 20 Apr 2018 12:59:26 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:39378 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753284AbeDTQ7Y (ORCPT ); Fri, 20 Apr 2018 12:59:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LZAxssNadHLU+Fq6meIZTWBT9mAswR4iqEMm8OBnbGA=; b=rU0RRG3EgwYErR0zGONe/n18+ DWelYgZw4WlaTgey6jA7IjoQN9GcMaOd02PLHoO6q6SwncfSWPLzLCFlSI3Bgl3qwIb5JbAvcRG5o +ePSM1frXi3Rj73brXBnUXCsRge5sM5wNtNW2XxpckK+1orWtiD3/eNbuyvTKYb6mH1yo=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1f9ZNa-000692-GP; Fri, 20 Apr 2018 16:59:22 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1f9ZNZ-0004Av-Ld; Fri, 20 Apr 2018 17:59:21 +0100 Date: Fri, 20 Apr 2018 17:59:21 +0100 From: Mark Brown To: Rob Herring Cc: devicetree@vger.kernel.org, devicetree-spec@vger.kernel.org, linux-kernel@vger.kernel.org, grant.likely@arm.com, frowand.list@gmail.com, mark.rutland@arm.com, Geert Uytterhoeven , Linus Walleij , Thierry Reding , shawnguo@kernel.org, Bjorn Andersson , Arnd Bergmann , Stephen Boyd , Jonathan Cameron Subject: Re: [RFC PATCH] dt-bindings: add a jsonschema binding example Message-ID: <20180420165921.GD22369@sirena.org.uk> References: <20180418222905.10414-1-robh@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IDYEmSnFhs3mNXr+" Content-Disposition: inline In-Reply-To: <20180418222905.10414-1-robh@kernel.org> X-Cookie: Smear the road with a runner!! User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --IDYEmSnFhs3mNXr+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 18, 2018 at 05:29:05PM -0500, Rob Herring wrote: > The current DT binding documentation format of freeform text is painful > to write, review, validate and maintain. >=20 > This is just an example of what a binding in the schema format looks > like. It's using jsonschema vocabulary in a YAML encoded document. Using > jsonschema gives us access to existing tooling. A YAML encoding gives us > something easy to edit. It'd be useful to see some examples of how things like including by reference other schema work. It feels like something we should be able to use more in a schema based thing but perhaps that's not viable with realistic tooling. In general this looks OK, especially with all the meta comments about the language stripped out. > + description: | > + A variable number of interrupts warrants a description of what con= ditions Like Stephen said the | looks odd. > + interrupt-names: > + # minItems must be specified here because the default would be 2 > + minItems: 1 > + items: > + - const: "tx irq" > + - const: "rx irq" Any way to relate this to the interrupts property in the schema language (eg, must have the less or equal number of elements)? > + # Property names starting with '#' must be quoted That's awkward :/ Perhaps just by convention quote all property names for simplicity? --IDYEmSnFhs3mNXr+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlraHGgACgkQJNaLcl1U h9Cwcwf+OPT6H3e4dIpc3TXlGFnRUlq6lOCoKrFgghQKJGb++VRCZ5En6R3KgC9/ GwuGMxXL8DofYs6bmSlsfHBXFfIgixvNcWeoVMtXxZI2YiXZ2560F0i4ccL0pZgc WkZsv2QDD+6k9to98mrX7pJG95+5mziDnbSmSFaemLSYGnPCM2JH+VsxuX1sblg+ BFu0PbSjuht7QVqiI6BraLT/YuoSkX35Il/oL8GVkpMn0mtLXoPhd6zzhSt+qNZV BHc7CIacO/FejCygpY+4TlBqk7S53grNwvcxEQNeTGLT2QJZdJZOOHmzeaPqD2Ee V/oXJpbYRoeXiBwC3F4PfMJO7j2K7g== =Dqz+ -----END PGP SIGNATURE----- --IDYEmSnFhs3mNXr+--