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=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 750E4C4338F for ; Mon, 23 Aug 2021 16:33:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3E31961361 for ; Mon, 23 Aug 2021 16:33:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E31961361 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.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qBy+7ZJ72feRsMezesj2BA33CPZuUqeOOvqnlYNFT+A=; b=fy7QghI3IipdXRi7lD4OW/R0ck 5b2wpf60fKOLoLwX+O3WrEwcWxooCGoT5oJ5al15iseG9Y/p+lS9bYjRUfuE9bRfnRrHAxGM33+ZZ RhYC9Rx7GTA6HP8AovkqlYYJpOYsaru69QzleOqeyX7tKm0lT9N6DhsybxNszIUSMKPJxJrNllY+a 3ufviYMvoCUcgfGvoWO6A/IBTzQ1ZKOnLMOsdfNlIr8p9q1LhVeg7ebYEpHLyt3Wb56gpkvYqWRZq 11QdEtz2kmx5SgTbcDCe1K8NYoKXluhLyxMAhwgMQh6esXw4LxD1YB3PI9BIohzVdDSngbf0R6RJg uvnlV4/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mICrD-0000ej-Kd; Mon, 23 Aug 2021 16:31:31 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mICr7-0000cG-Af for linux-arm-kernel@lists.infradead.org; Mon, 23 Aug 2021 16:31:29 +0000 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 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210823_093125_487425_CCBEE65C X-CRM114-Status: GOOD ( 35.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3933054078993087781==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3933054078993087781== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gc4zibryza3dkjdm" Content-Disposition: inline --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-- --===============3933054078993087781== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============3933054078993087781==--