Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1255983ybx; Thu, 31 Oct 2019 07:56:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqziZBsLcDGpsvfiSoUqGdMMXoN2WqvzPy/TRQuSYKv00/SCv+upiwNlQL2ahda4rYAEITMJ X-Received: by 2002:a50:9993:: with SMTP id m19mr6455579edb.208.1572533782168; Thu, 31 Oct 2019 07:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572533782; cv=none; d=google.com; s=arc-20160816; b=EvcvJ3LYNPFCpM5Yt/9YVyNhGvSH5RfWeQwUtv2iDdu0KGrcx7w9+/ujy7/6Y/4GsX Ah6NTA8K0wmUmsOsI8sR3WVXFpsN967Wn8WN5oygk9VgIIippmQNTRDgE99oUdaskK0j 16zrw1TdzCydn/M3HoJsq68oSCs8e1oMA+wFvNOX1qZ7ZjFhpadY3/0rLKuwgn+EGxu8 gzAGa1AwW40MXsxUDH9yoTpYDjlS/01Y8TpTJ4DrZUzZDQ8ogLYG4mFwounvADmP6YOy IZE20AFsePwuBmsI/Pa4c6sivYfQ87j2XOh4eRXjuOQdD6ZRxaJMoKJzvfWmr8iWNqa6 AqbA== 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; bh=vvDVz+t1t1+10Wua7S0YO5D7pbtQ8ynZe578BsMZHws=; b=j8oNxC6vywUh6IwOl28bN7HH2Nju8V3I3APzd92DzANrihvILWmvsWqv5wDrMbHjfN W93lV6ESC55qmGMmSquCU35jty8OQFZXKU8h6wirnJRHdjyYSu1Glor64HEgKQpTgvlG j2LLT5aWj7cSY7HJbsO7+4wqhdrldlSmFA4jZLClJ6uGIDa4RfPF4/KckK6lVczMACj6 OK7N5EZrID7n3oL5Mnr4x5+tsycU26KJ84ip4NwwfhVqGtekXheh8k3LIZa99TMIbPpl F4t0RKwvoqoNB+F8OVQW/4OJQDGOmNdgnv559Xixp3GP5VdixDHzleN2rrDRpUnVGMoi r5cg== ARC-Authentication-Results: i=1; mx.google.com; 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 k16si3600437eji.401.2019.10.31.07.55.58; Thu, 31 Oct 2019 07:56:22 -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; 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 S1728288AbfJaOw2 (ORCPT + 99 others); Thu, 31 Oct 2019 10:52:28 -0400 Received: from verein.lst.de ([213.95.11.211]:51479 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728021AbfJaOw2 (ORCPT ); Thu, 31 Oct 2019 10:52:28 -0400 Received: by verein.lst.de (Postfix, from userid 2005) id 0102D68BE1; Thu, 31 Oct 2019 15:52:24 +0100 (CET) Date: Thu, 31 Oct 2019 15:52:24 +0100 From: Torsten Duwe To: Maxime Ripard Cc: Chen-Yu Tsai , Rob Herring , Mark Rutland , Thierry Reding , David Airlie , Daniel Vetter , Andrzej Hajda , Laurent Pinchart , Icenowy Zheng , Sean Paul , Vasily Khoruzhick , Harald Geyer , Greg Kroah-Hartman , Thomas Gleixner , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 6/7] dt-bindings: Add ANX6345 DP/eDP transmitter binding Message-ID: <20191031145224.GA5973@lst.de> References: <20191029153815.C631668C4E@verein.lst.de> <20191029153953.8EE9B68D04@verein.lst.de> <20191031125100.qprbdaaysg3tmhif@hendrix> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031125100.qprbdaaysg3tmhif@hendrix> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 31, 2019 at 01:51:00PM +0100, Maxime Ripard wrote: > On Tue, Oct 29, 2019 at 01:16:57PM +0100, Torsten Duwe wrote: > > + > > + ports: > > + anyOf: > > + - port@0: > > + description: Video port for LVTTL input > > + - port@1: > > + description: Video port for eDP output (panel or connector). > > + May be omitted if EDID works reliably. > > + required: > > + - port@0 > > Have you tried to validate those two ports in a DT? Yes, it validates as expected, like I wrote. Various sources told me that json-schema is not always straightforward so I assumed anyOf was OK. > I'm not quite sure what you wanted to express with that anyOf, but if > it was something like port@0 is mandatory, and port@1 is optional, it > should be something like this: > > properties: > > ... > > ports: > type: object > > properties: > port@0: > type: object > description: | > Video port for LVTTL input > > port@1: > type: object > description: | > Video port for eDP output (..) > > required: > - port@0 > > This way, you express that both port@0 and port@1 must by nodes, under > a node called ports, and port@0 is mandatory. That validates, too. Looks better, admittedly. I don't have a strong opinion here. It's just that Rob wrote in : | For this case specifically, we do need to define a common graph | schema, but haven't yet. You can assume we do and only really need to | capture what Maxime said above. (your points back then were port@N descriptions and neccessity for port@0) Are you sure that "object" is specific enough? > You should even push this a bit further by adding > additionalProperties: false to prevent a DT from having undocumented > properties and children for the main node and ports node. You mean like | jsonschema.exceptions.SchemaError: Additional properties are not allowed ('unevaluatedProperties' was unexpected) [...] | On schema: | {'$id': 'http://devicetree.org/schemas/watchdog/allwinner,sun4i-a10-wdt.yaml#', [...] | 'unevaluatedProperties': False} ? ;-) But yes, this patch series passes even with additionalProperties: false. In which form would you like to receive the update? Torsten