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.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 409C1C4338F for ; Wed, 18 Aug 2021 13:51:18 +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 03D6B60EFE for ; Wed, 18 Aug 2021 13:51:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 03D6B60EFE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fWra+yG7ru8alhyhx5z8UXg32bYPPvgDnTTbSZYFfZM=; b=pTkQ0+WpV2l6dU VXo4zTcwTw7eD+LzPymZuR7KKWsK/yec3S0I4HzDog2CxEyqxNohMryW81ce1twW7SLjWkraekZMO eQkyS5zw/9H6YGX8Gddpr+rNEM75SIO+splIud6rST4zfJRZAlPalWtMajOL2PNi6Cbc7tDZjRD4h CdvxCq/QR4qQcWXGwv8Sqh8SlfgxHyse9ztl1hTOCVKuXR1HgNhChTP6hlABJxBpiWcM3G1CBhPGr i+ilGLyBiRpH0zubzdJ9LRYrCb0JpfdSpE6Za9eSmZd6JcGA9G9l3p04t9PnLswHzMzJS4Tk6eRKd 5bC8PHiqnMo9y8WCppNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGLwF-005kw5-Vl; Wed, 18 Aug 2021 13:49:04 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGLwC-005kvD-Fc for linux-arm-kernel@lists.infradead.org; Wed, 18 Aug 2021 13:49:01 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id BFA356109F for ; Wed, 18 Aug 2021 13:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629294539; bh=3d/r0rH82Ey9YBWihKynZopMtUG/4vN1LMoq18TvMS8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rc38DWNtBDV7VojjFSXi7IbmxYaNytSXR1l7Hcww7UqG5JLo9+6MDUAtjECWeMT/+ 2hmo+hAxbGAhdOFbf3el4S29ogtpDC5uNFNQJq/mQ2/1IdZRPtRp343lRdhE681OD6 5DJZMn+HsUOMKm3UIptiKfa6491obP5sWMiQHrurxqakgM1Q0uaUZsmv5557wpsSnG 7Kg1bqBUeKIqjglfd+xbqWy8yip0b+k3GSjRO23khuBWvorOq99wLWkskgP/FvUJfH Emw+C1RVaLfm3xD3j0I/Sgoc8FWF8yqYcHQ8/0Izd6Sbspp71OkmlNh1dqqDlU4h6+ 4jUniSTbLVHRw== Received: by mail-ed1-f54.google.com with SMTP id b7so3280784edu.3 for ; Wed, 18 Aug 2021 06:48:59 -0700 (PDT) X-Gm-Message-State: AOAM533KUJObYlYwiujdqpt2ktM1swHV3WrUEAy3h9L8zd7G1m1HfspL tTEYDgf+n5fxiodzzGgRx4VphgvIvpYQqCaLfQ== X-Google-Smtp-Source: ABdhPJyNyNVlAVmZYQ+7HoUkF0ChQiGO8tNXo0yVR4wbbxUAJsucTNHTT2Zlf9jpt5RmNIv1toalySAap6px4WTmfvs= X-Received: by 2002:a05:6402:1215:: with SMTP id c21mr10340421edw.137.1629294538363; Wed, 18 Aug 2021 06:48:58 -0700 (PDT) MIME-Version: 1.0 References: <20210721140424.725744-1-maxime@cerno.tech> <20210721140424.725744-11-maxime@cerno.tech> <20210722022947.GA3168293@robh.at.kernel.org> <20210818124304.2jxsf44bcbprcvbk@gilmour> In-Reply-To: <20210818124304.2jxsf44bcbprcvbk@gilmour> From: Rob Herring Date: Wed, 18 Aug 2021 08:48:46 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 10/54] dt-bindings: display: panel-lvds: Document panel compatibles To: Maxime Ripard 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210818_064900_593040_FE901ED5 X-CRM114-Status: GOOD ( 31.59 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 use 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 create 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.yaml 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 compatibles. 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? No, both conditions will be true. If you use 'anyOf', then we're never really checking the specific compatible. I think the problem here is trying to mix a common binding (aka an incomplete collection of properties) and a specific binding. The former is characterized with 'additionalProperties: true' as we have here. You need to create a 'panel-simple-lvds.yaml' schema file that references this one, defines all the 'simple' compatibles, and sets 'unevaluatedProperties: false'. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel