Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11213978imu; Thu, 6 Dec 2018 13:29:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/WWe2G3W30aJ7v3YTR5IYAEbQD95T72sTbOMFeclPinU4NT4JPDR/1wUZedMDjjTwuUYBd7 X-Received: by 2002:a63:d655:: with SMTP id d21mr24371233pgj.280.1544131759437; Thu, 06 Dec 2018 13:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544131759; cv=none; d=google.com; s=arc-20160816; b=cxhzzW2dd5Hyp5vzyslFeT8Vd3sgRKnjMW5+lUEuKdbITkvPMuPrJQMO3pFRLcgJWk 1OHir2WnF2sviW7VeFl9A4L9/2jqwJc6ebKC+6Ke0Aj9U+W5l5ly1gXUFSWCOCDp7KJ3 zs2LFXWpQiNTCmLYzcnLATwC9+wIVg7eWk6vJhexhbP97/4cHBHm8DbxYxlaej1g7+xg fT6tFXyvdxN66Z0R35fexYwslty9NeJs5NN2M/hlYtcs0/xBc/m8Das+bwhDlrKLmaqM DvTbquS37bK/BxYPOQ3vxpp1CwdiT+L61+rFAU8gIlkQKI03DHf5c/Y5vswuWkIzP/FQ 168w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3j0S9Py8H70gdNbMSiaMwPgaitp9h+e2iTT9G08lpew=; b=PpnOqrpi+YP+qbq6DUIS2hyzYVsPDELf8eZLWNjt97snH+dyWDZqkCypdFpBpzHAh9 agAdWbBgY97sJAt5td4UkzdllXph32ZhH9Q7rysPA7T8ud8MTsujdQjY2xFqDsk9H0Nq KGK6Te4+fN3yFyVDE+afcIhwcMaNk5q9vmhUEerY3p5ugQcP0q2XPwvscr7BEFXbXm93 HJzqF+bQzGswH/ApylyZSB8Rl/o1UitJOf8huM8dMtuZ7EROlmafMad9W2tAMyAtnAFD QJGy6qEaQksUeUxbAZuJCV/ITEX6jm9YLki1P/1FIncjgn0xJfbs661MNQ0onaYDasdm nzDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mtw80NaM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19si1233466pfa.80.2018.12.06.13.29.04; Thu, 06 Dec 2018 13:29:19 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=Mtw80NaM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726279AbeLFV1v (ORCPT + 99 others); Thu, 6 Dec 2018 16:27:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:46588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbeLFV1q (ORCPT ); Thu, 6 Dec 2018 16:27:46 -0500 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 22DE92146F; Thu, 6 Dec 2018 21:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544131665; bh=YUKdoUTdVOsh4ePDuGZ5IkFg5OFwW2rDLrMYKWOZJig=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Mtw80NaMfMVffOW74aj/EI26GoQDEzan0jzuEAo+MAJ6brIQBDlkWQKmd9IWDFEXk Tn9/bMPwQS6xTmEYNE5bM/Mg9ql9Q8lAcUMZMtdl1Qw6kzdzwTf4DXTlz+llH2FShD 9neyDhJX+Xl3B1H4Kz94GaksN4CqAIAXVOkIJlR4= Received: by mail-qt1-f178.google.com with SMTP id r14so2284760qtp.1; Thu, 06 Dec 2018 13:27:45 -0800 (PST) X-Gm-Message-State: AA+aEWYvexktP4dJjkXSiiae/uIi+tZ5pQGMnpG9QI5gbGL5gw1w6OU1 ZjBMHXCBd5y+02OEdeeKQ6RFmdSbEOrFIX5gRQ== X-Received: by 2002:a0c:e2ca:: with SMTP id t10mr29894028qvl.77.1544131664335; Thu, 06 Dec 2018 13:27:44 -0800 (PST) MIME-Version: 1.0 References: <20181203213223.16986-1-robh@kernel.org> <20181203213223.16986-15-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Thu, 6 Dec 2018 15:27:31 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 14/34] dt-bindings: arm: Convert Amlogic board/soc bindings to json-schema To: Neil Armstrong Cc: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Mark Rutland , Kumar Gala , ARM-SoC Maintainers , Sean Hudson , Frank Rowand , Grant Likely , Kevin Hilman , Carlo Caione , linuxppc-dev , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-amlogic@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 4, 2018 at 8:44 AM Rob Herring wrote: > > On Tue, Dec 4, 2018 at 2:39 AM Neil Armstrong wrote: > > > > Hi Rob, > > > > You forgot linux-amlogic in CC... > > > > On 03/12/2018 22:32, Rob Herring wrote: > > > Convert Amlogic SoC bindings to DT schema format using json-schema. > > > > > > Cc: Carlo Caione > > > Cc: Kevin Hilman > > > Cc: Mark Rutland > > > Cc: devicetree@vger.kernel.org > > > Signed-off-by: Rob Herring > > > --- > > [...] > > > > + - items: > > > + - enum: > > > + - amlogic,s400 > > > + - const: amlogic,a113d > > > + - const: amlogic,meson-axg > > > + - items: > > > + - enum: > > > + - amlogic,u200 > > > + - const: amlogic,g12a > > > > but all this feels wrong for me. > > > > First of all, this yaml description is not human friendly and not intuitive at all, > > and secondly with this conversion we loose all the comments about the SoC family relationship > > with the compatible strings ! > > > > I really understand the point to have automated verification, but really it's a pain to read > > (I can't imagine newcomers... the actual DT bindings are already hard to read...) and > > I feel it will be a real pain to write ! > > What do you suggest that would be easier? Is it the YAML itself or the > json-schema vocabulary? For the former, we could use {} and [] to make > things more json style. But I imagine it is the latter. > > There is some learning curve for json-schema and is certainly a > concern I have, but there would be a learning curve for anything. Our > choices are use some existing schema language or invent one. All the > previous efforts (there's been about 5 since 2013) have been inventing > one, and they've not gone far. There will be far few resources > available to train people with if we do something custom. > > > Can't we mix an "humam text" with a "yaml" part on a same document ? we are in 2018 (nearly 2019), > > and it should be easy to extract a yaml description from a text document without pain and > > keep all the human description, no ? > > Yes. Please go look at the annotated example in patch 2. How's this?: compatible: oneOf: - description: Boards with the Amlogic Meson6 SoC items: - enum: - geniatech,atv1200 - const: amlogic,meson6 - description: Boards with the Amlogic Meson8 SoC items: - enum: - minix,neo-x8 - const: amlogic,meson8 - description: Boards with the Amlogic Meson8m2 SoC items: - enum: - tronsmart,mxiii-plus - const: amlogic,meson8m2