Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8331552imu; Tue, 4 Dec 2018 06:48:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/X00DiMSjYS6DIbhZ/RY7ODv3/6WAz+K8iywjHSufxIO7ZgJi20R509mQKXuh3IhMpRoJ1r X-Received: by 2002:a63:5c22:: with SMTP id q34mr16918588pgb.417.1543934883310; Tue, 04 Dec 2018 06:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543934883; cv=none; d=google.com; s=arc-20160816; b=usZ6TUuA0PjnIjadkKB0TVlnrceOW0J/dtsfmFFIW1AsPARlQY6hmqEn/rJUeCF8d4 kzd3jnanQo8xikcdmZ03QP1dRTiSgtWsPd68S59eehpJSzF53U5AOJH35bGK0mN+R8/G ooAPgeCK0zrbukcJAiWyK2syZDLNkXzk54fbrji86T/DtLp3AJUmQi3V1W1BllQqEw0+ 1dXjLoEoNiGLuOYjf565hnXaDHMVZyLLONLRU81vJh3Hmpa/3sRvV1WtspMBuiVgXV2J ii7wi0zz7ZDjteVALT/uoI0P6zbKp6JPUzsEAdV0I57Le1PjxLva7nbEP8/O5+3AlnCW OzTQ== 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=sm+knZtZW0GPr4FQPxY86yMYyBhUHWgMv9+1i8DF3AI=; b=JgYj41KlgQG2eEeannAXnVV6xDRPHZF8LSWRvLEYGlXy6hneuiLbJkjgOo/ct7YBFO +tnuuVrtAWPJmaqHQZF6l8Y0aPg08bOF1YbzYyqg/CsWoPZxA/518C41u8uUR5rS/hK4 A+1M4tmOiHBLDEIAofnsAIb/V6QUrIJgfh5EKhJ10jrqvWhSBuyHRRUz6C6Lg1bAHGu2 zJODNU8r6eLvLIR6hVW17AQj5+Ly0wMQHu4VFE21Mf5AO7bMJ27zM4R15Odo/4WrhHRf W3/ql59eLqcSoCAMe06aKnK/IHiU2cXI3Z2fXbELbnH42h58jpHlrlWe7Je0ABW2a9aw R/vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=I9Kj3r0o; 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 bh12si14325769plb.353.2018.12.04.06.47.47; Tue, 04 Dec 2018 06:48:03 -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=I9Kj3r0o; 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 S1726652AbeLDOpI (ORCPT + 99 others); Tue, 4 Dec 2018 09:45:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:50622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726309AbeLDOpG (ORCPT ); Tue, 4 Dec 2018 09:45:06 -0500 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 6DB74214DA; Tue, 4 Dec 2018 14:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543934705; bh=hVb8TID6cd1Olg3jtzdBexIhOrCiR/d52f5IOpnmACI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=I9Kj3r0o3/KmrFHvG5GA+pHQ+dy7Ck2z0nBok1uWJCjEzruGA59yQo0y1FUoCsswk o1aUEqebWNFZ+Ip6QC3hVzUmt5fPdbbp1IG8/nQbMgOSbjkGWOSY/gCtPmTyidtwMS Yy/BeYZ28OHA5lgEi9DmgXTRG0r6SrbtOljEJnKM= Received: by mail-qt1-f176.google.com with SMTP id r14so18303203qtp.1; Tue, 04 Dec 2018 06:45:05 -0800 (PST) X-Gm-Message-State: AA+aEWabfDNQBcpbRss9JXgU3Ay3IIqzCytJBrREZgoS/w6xd1DUpFNH ig8sLjT91RoK/1Xcd+UpjTPJCYWcAMlZnApXlg== X-Received: by 2002:aed:3ecf:: with SMTP id o15mr19931119qtf.26.1543934704526; Tue, 04 Dec 2018 06:45:04 -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: Tue, 4 Dec 2018 08:44:52 -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 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. > What will be the case for all the bindings with ASCII art to describe the architecture of the > HW ? will you simply drop it to replace it with cold yaml description ? No, you can have literal blocks and/or comments with however much description you like. In fact, there's some notion to write the descriptions in sphinx and extract them to generate documentation, but that's a ways off. That's just the extent of what is possible. Rob