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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 4F5A2C432BE for ; Mon, 23 Aug 2021 16:31:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 B8A9360F39 for ; Mon, 23 Aug 2021 16:31:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B8A9360F39 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 712508961E; Mon, 23 Aug 2021 16:31:24 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id CA8DF89548 for ; Mon, 23 Aug 2021 16:31:22 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 41F1658039B; Mon, 23 Aug 2021 12:31:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 23 Aug 2021 12:31:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=T0T2IQIdQxYTEIzrXLU/J/hA1hB QCXbH3bEfulkB1MM=; b=O1OvYF3DwxwKsvgI3LFqEfPZoyYhk/UUm1GcsPNvoE0 Y5wQTlW+BbfwnRjlpGXVoaUcstFKDdhlsB6PWomJn5gDI2XBl1W+cl7LCxg7hZLt N6e7KkqRnG+W7AzgwZ0+56lWBGZcEseMNlqOif7ZuQ/DWE7jUC6o9MW6DpySidUJ J0sZbxSklW5+l3bk7GaP2zuJU0jRBla+z+NZZb87Q5hur/A49BdUred2e3uT/ai4 VxW8QfZB74G64G30wQTa9fS+SawV0iXCBUfhn9LvVkEgQ02vLs7wFEETlpba0Jo5 aHDQuH9WG73aKtKdE/gEB2DY56oWjMGLypvW/lxEGyw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=T0T2IQ IdQxYTEIzrXLU/J/hA1hBQCXbH3bEfulkB1MM=; b=f9OksScv9+UuVenQdj20su FH3n3SWzXatLhC92VcRl5ZFpQdiT3ZymtJMrVKbig8PJJXc5klNhP/r70P8Iwwvn 3Hxl4RwHFr0+17IYzSFDVgZT8nUIAfA+/m2+XYzQzdAbebJtkeV0tIoBn891AiwK qAEjusouyIWNapPt8sZ2cJiZXuctru/cn+D7HFiZki8tqlkW2geQGNuc9OIxFni4 oBhyfiqUfShinpcg7rreKmgauRCsbu/J87PcEUjD7xNL0mZvvxyqnNCAWilRT7rI 1dxfxKqW2HEN/sFZyuCEbNdC1ZXX3qv5HVRb3k1XMCAJtdxWVv2zErwlrSov6pYw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddthedguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeeghefhuddtleejgfeljeffheffgfeijefhgfeufefhtdevteegheei heegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 23 Aug 2021 12:31:16 -0400 (EDT) Date: Mon, 23 Aug 2021 18:31:14 +0200 From: Maxime Ripard To: Rob Herring Cc: Chen-Yu Tsai , Jernej Skrabec , devicetree@vger.kernel.org, Frank Rowand , linux-arm-kernel , linux-sunxi@googlegroups.com, dri-devel , Laurent Pinchart , Sam Ravnborg , Thierry Reding Subject: Re: [PATCH 10/54] dt-bindings: display: panel-lvds: Document panel compatibles Message-ID: <20210823163114.ohmdpc7pn22p5ycd@gilmour> References: <20210721140424.725744-1-maxime@cerno.tech> <20210721140424.725744-11-maxime@cerno.tech> <20210722022947.GA3168293@robh.at.kernel.org> <20210818124304.2jxsf44bcbprcvbk@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gc4zibryza3dkjdm" Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --gc4zibryza3dkjdm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Aug 18, 2021 at 08:48:46AM -0500, Rob Herring wrote: > On Wed, Aug 18, 2021 at 7:43 AM Maxime Ripard wrote: > > > > Hi Rob, Sam, > > > > On Wed, Jul 21, 2021 at 08:29:47PM -0600, Rob Herring wrote: > > > On Wed, Jul 21, 2021 at 04:03:40PM +0200, Maxime Ripard wrote: > > > > The binding mentions that all the drivers using that driver must us= e a > > > > vendor-specific compatible but never enforces it, nor documents the > > > > vendor-specific compatibles. > > > > > > > > Let's make we document all of them, and that the binding will creat= e an > > > > error if we add one that isn't. > > > > > > > > Cc: dri-devel@lists.freedesktop.org > > > > Cc: Laurent Pinchart > > > > Cc: Sam Ravnborg > > > > Cc: Thierry Reding > > > > Signed-off-by: Maxime Ripard > > > > --- > > > > .../bindings/display/panel/lvds.yaml | 18 ++++++++++++--= ---- > > > > 1 file changed, 12 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/display/panel/lvds.y= aml b/Documentation/devicetree/bindings/display/panel/lvds.yaml > > > > index 49460c9dceea..d1513111eb48 100644 > > > > --- a/Documentation/devicetree/bindings/display/panel/lvds.yaml > > > > +++ b/Documentation/devicetree/bindings/display/panel/lvds.yaml > > > > @@ -31,12 +31,18 @@ allOf: > > > > > > > > properties: > > > > compatible: > > > > - contains: > > > > - const: panel-lvds > > > > - description: > > > > - Shall contain "panel-lvds" in addition to a mandatory panel-= specific > > > > - compatible string defined in individual panel bindings. The = "panel-lvds" > > > > - value shall never be used on its own. > > > > + items: > > > > + - enum: > > > > + - advantech,idk-1110wr > > > > > > At least this one is documented elsewhere. > > > > Indeed, I missed it. > > > > > You can add 'minItems: 2' if you want to just enforce having 2 compat= ibles. Or do: > > > > > > items: > > > - {} > > > - const: panel-lvds > > > > > > Which also enforces the order. > > > > It's not just about the order since a missing compatible will also raise > > a warning. > > > > Some of those panels have a binding of their own, but some probably > > won't (and I can't find anything specific about the one I'm most > > interested in: tbs,a711-panel) > > > > Can we have something like: > > > > compatible: > > oneOf: > > - items: > > - enum: > > - tbs,a711-panel > > - const: panel-lvds > > > > - items: > > - {} > > - const: panel-lvds > > > > That would work for both cases I guess? >=20 > No, both conditions will be true. If you use 'anyOf', then we're never > really checking the specific compatible. >=20 > I think the problem here is trying to mix a common binding (aka an > incomplete collection of properties) and a specific binding. I'm not entirely sure why we have specific bindings for this in the first place. We currently have 6 specific bindings, and for 5 of them the only specific thing in there are the data-mapping value to force and their dimension. I'd argue that the dimension shouldn't even be set in stone: you could very well imagine a screen with exactly the same timings but a different size. We would consider it compatible. And the data-mapping can be dealt with with an if clause fairly easily. And for the last one, the specific thing about it is that it's using a dual-link output, which is a generic binding and could thus be described in panel-lvds too. Maxime --gc4zibryza3dkjdm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYSPNUgAKCRDj7w1vZxhR xTI2AP9NomBLo9Y5OqIN8rhni9FhgNloWJ7wVZ4JXn72s2OPEgEAweFc/UriqVXv 5geR/VICigGlB1UIS1Q8Oo/reVrKCgg= =xQy8 -----END PGP SIGNATURE----- --gc4zibryza3dkjdm--