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.0 required=3.0 tests=BAYES_00,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 A51B9C433E0 for ; Wed, 3 Feb 2021 15:58:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50D3E64F8C for ; Wed, 3 Feb 2021 15:58:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234657AbhBCP5T (ORCPT ); Wed, 3 Feb 2021 10:57:19 -0500 Received: from mail-oi1-f173.google.com ([209.85.167.173]:44424 "EHLO mail-oi1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234575AbhBCP4F (ORCPT ); Wed, 3 Feb 2021 10:56:05 -0500 Received: by mail-oi1-f173.google.com with SMTP id n7so296941oic.11; Wed, 03 Feb 2021 07:55:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qT9vhKEcJnv2UxHfk3LsH4oahpbnsqDoYZLdzv8tkwQ=; b=YCZJ1yp85PvCKJN7RAdn+4VEigPGpegOt2q/tut50IqCuAFWiO1topmTGZQ7Y8e14N RmJF6Bblo/B7D48QIiAG9sEfVgOB4qYTwNObAKUd9XMDrwP4Z0CfOolEkL+WD1okGXpU sz+biOuKuoB/1jTAqeG0HlwZp1714Ud90/Sg22EVD/TLOhRau3YrvQFGJUfjH6QY1qUQ EBDLPt+eweof8NpOr/gRsDK1DyjjWy/kq0NWUiehPcn/6HZPw+F7nnv4cvpvedBPGc+p Memp5xX+UcC/LJY/Aam5aNJgJTLKr+lmqSjjiV9WWpgT02zDk8vrjVusJ6PDI62Oct48 iQQw== X-Gm-Message-State: AOAM533b2I7bGEo3hw3v6/mIth82iIPKKHFI1b62M5w+kvVcFITRjxuC rvuRRCB0nb4iPVEFxKbbeg== X-Google-Smtp-Source: ABdhPJxmOBQcH5R+lFiUlGBqVbuj5kwZxcJFcUI25C3II5lOgKlwz+nfG7ePzMnfdKQ5jcv5RyiyOg== X-Received: by 2002:aca:4e13:: with SMTP id c19mr2424431oib.66.1612367721055; Wed, 03 Feb 2021 07:55:21 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o14sm481868oof.38.2021.02.03.07.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 07:55:19 -0800 (PST) Received: (nullmailer pid 1895243 invoked by uid 1000); Wed, 03 Feb 2021 15:55:17 -0000 Date: Wed, 3 Feb 2021 09:55:17 -0600 From: Rob Herring To: Geert Uytterhoeven Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Stephen Boyd , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Herbert Xu , "David S. Miller" , Daniel Palmer , Bartosz Golaszewski , Avi Fishman , Tomer Maimon , Tali Perry , Joerg Roedel , Will Deacon , Andrew Jeffery , Joel Stanley , Wim Van Sebroeck , Guenter Roeck , Yoshihiro Shimoda , Vincent Cheng , linux-clk , Linux Crypto Mailing List , "open list:GPIO SUBSYSTEM" , Linux I2C , Linux IOMMU , Linux Watchdog Mailing List , Eric Anholt , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , Pavel Machek , Ulf Hansson , Kishon Vijay Abraham I , Vinod Koul , Geert Uytterhoeven , Daniel Lezcano , DRI Development , linux-leds , Linux MMC List Subject: Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas Message-ID: <20210203155517.GC3706951@robh.at.kernel.org> References: <20210202205544.24812-1-robh@kernel.org> <20210202205544.24812-3-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On Wed, Feb 03, 2021 at 09:01:23AM +0100, Geert Uytterhoeven wrote: > Hi Rob, > > On Tue, Feb 2, 2021 at 9:55 PM Rob Herring wrote: > > Properties in if/then schemas weren't getting checked by the meta-schemas. > > Enabling meta-schema checks finds several errors. > > > > The use of an 'items' schema (as opposed to the list form) is wrong in > > some cases as it applies to all entries. 'contains' is the correct schema > > to use in the case of multiple entries. > > > Signed-off-by: Rob Herring > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > > +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > > @@ -81,9 +81,8 @@ properties: > > if: > > properties: > > compatible: > > - items: > > - enum: > > - - renesas,usb2-phy-r7s9210 > > + contains: > > + const: renesas,usb2-phy-r7s9210 > > Single entry, so "contains" not needed? No, you are misunderstanding how these work. 'contains' means at least one entry in an array passes with the subschema. In this case, 'renesas,usb2-phy-r7s9210' must appear somewhere in the 'compatible' values. (Before, it said *every* entry must be 'renesas,usb2-phy-r7s9210'.) As there is a fallback compatible, we need 'contains'. > > --- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > > +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > > @@ -76,11 +76,10 @@ required: > > if: > > properties: > > compatible: > > - items: > > - enum: > > - - renesas,pfc-r8a73a4 > > - - renesas,pfc-r8a7740 > > - - renesas,pfc-sh73a0 > > + enum: > > + - renesas,pfc-r8a73a4 > > + - renesas,pfc-r8a7740 > > + - renesas,pfc-sh73a0 > > Missing "contains"? No. In this case, 'compatible' is always a single entry, so no 'contains' needed (but would work). If compatible is one of these 3 strings, then the 'if' is true. The original way would actually work in this case (i.e. is valid json-schema), but we require 'items' to have a size (maxItems/minItems) in our meta-schema. Rob 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.0 required=3.0 tests=BAYES_00,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 C5E4DC433E6 for ; Wed, 3 Feb 2021 15:55:25 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.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 33B3F64F8D for ; Wed, 3 Feb 2021 15:55:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 33B3F64F8D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C59018712C; Wed, 3 Feb 2021 15:55:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VTLBlztmD09e; Wed, 3 Feb 2021 15:55:23 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id D517087121; Wed, 3 Feb 2021 15:55:23 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B3F5BC0FA8; Wed, 3 Feb 2021 15:55:23 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 89567C0174 for ; Wed, 3 Feb 2021 15:55:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 74A0687150 for ; Wed, 3 Feb 2021 15:55:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qRgQBLz5q76V for ; Wed, 3 Feb 2021 15:55:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by hemlock.osuosl.org (Postfix) with ESMTPS id CEA7B8712F for ; Wed, 3 Feb 2021 15:55:21 +0000 (UTC) Received: by mail-oi1-f176.google.com with SMTP id h6so339275oie.5 for ; Wed, 03 Feb 2021 07:55:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qT9vhKEcJnv2UxHfk3LsH4oahpbnsqDoYZLdzv8tkwQ=; b=m5BiHIyksE+a7QZt1wGK7nooyjTmEdg9BPVQ5tsewp05x4o6WulQfV8SAKmiozj9rZ tuAItq+myHAgbJ1izJrceth2/HyBJyXYjILkaBCV77D5D6K+IyYZRvy9c2J43Buel40o Ep/lHhBEuphe2A8QFtRDMRefJAIABbOt1mzliZhWyl23MXwg7R61TvMDdTYIZQJnG11R Hyaxx7Kgo+NuNz7gEYEGeauUpntb9f3fwbL4d4krl/Be/wpzgQ0+yT1alxN+u93O3kqh Mn6/+ThrZpC0YsEAdTTcvk8Ock9gH3NQKwdTZqNRt8Ju8ASpO8fY6BiNaX0GX3k9o7hp EN6g== X-Gm-Message-State: AOAM531ZHxw+muYBMJegBhVJn442yrgn7KIxJBCjxlFabEq3d0cUD1N+ Pd4PKNFHp6WR/vSYHhjwxw== X-Google-Smtp-Source: ABdhPJxmOBQcH5R+lFiUlGBqVbuj5kwZxcJFcUI25C3II5lOgKlwz+nfG7ePzMnfdKQ5jcv5RyiyOg== X-Received: by 2002:aca:4e13:: with SMTP id c19mr2424431oib.66.1612367721055; Wed, 03 Feb 2021 07:55:21 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o14sm481868oof.38.2021.02.03.07.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 07:55:19 -0800 (PST) Received: (nullmailer pid 1895243 invoked by uid 1000); Wed, 03 Feb 2021 15:55:17 -0000 Date: Wed, 3 Feb 2021 09:55:17 -0600 From: Rob Herring To: Geert Uytterhoeven Subject: Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas Message-ID: <20210203155517.GC3706951@robh.at.kernel.org> References: <20210202205544.24812-1-robh@kernel.org> <20210202205544.24812-3-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: Ulf Hansson , Tomer Maimon , Geert Uytterhoeven , Linus Walleij , Vincent Cheng , DRI Development , Tali Perry , Eric Anholt , Daniel Palmer , Linux I2C , Pavel Machek , Will Deacon , linux-clk , linux-leds , Florian Fainelli , Herbert Xu , Daniel Lezcano , Vinod Koul , Kishon Vijay Abraham I , Bartosz Golaszewski , Chen-Yu Tsai , Joel Stanley , Guenter Roeck , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Watchdog Mailing List , Ray Jui , Maxime Ripard , "open list:GPIO SUBSYSTEM" , Wim Van Sebroeck , Avi Fishman , Scott Branden , Stephen Boyd , Linux MMC List , Linux Kernel Mailing List , Andrew Jeffery , Linux IOMMU , Linux Crypto Mailing List , "David S. Miller" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Wed, Feb 03, 2021 at 09:01:23AM +0100, Geert Uytterhoeven wrote: > Hi Rob, > > On Tue, Feb 2, 2021 at 9:55 PM Rob Herring wrote: > > Properties in if/then schemas weren't getting checked by the meta-schemas. > > Enabling meta-schema checks finds several errors. > > > > The use of an 'items' schema (as opposed to the list form) is wrong in > > some cases as it applies to all entries. 'contains' is the correct schema > > to use in the case of multiple entries. > > > Signed-off-by: Rob Herring > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > > +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > > @@ -81,9 +81,8 @@ properties: > > if: > > properties: > > compatible: > > - items: > > - enum: > > - - renesas,usb2-phy-r7s9210 > > + contains: > > + const: renesas,usb2-phy-r7s9210 > > Single entry, so "contains" not needed? No, you are misunderstanding how these work. 'contains' means at least one entry in an array passes with the subschema. In this case, 'renesas,usb2-phy-r7s9210' must appear somewhere in the 'compatible' values. (Before, it said *every* entry must be 'renesas,usb2-phy-r7s9210'.) As there is a fallback compatible, we need 'contains'. > > --- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > > +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > > @@ -76,11 +76,10 @@ required: > > if: > > properties: > > compatible: > > - items: > > - enum: > > - - renesas,pfc-r8a73a4 > > - - renesas,pfc-r8a7740 > > - - renesas,pfc-sh73a0 > > + enum: > > + - renesas,pfc-r8a73a4 > > + - renesas,pfc-r8a7740 > > + - renesas,pfc-sh73a0 > > Missing "contains"? No. In this case, 'compatible' is always a single entry, so no 'contains' needed (but would work). If compatible is one of these 3 strings, then the 'if' is true. The original way would actually work in this case (i.e. is valid json-schema), but we require 'items' to have a size (maxItems/minItems) in our meta-schema. Rob _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 7629BC433DB for ; Wed, 3 Feb 2021 15:55:24 +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 0E18564F55 for ; Wed, 3 Feb 2021 15:55:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E18564F55 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DB4B6EB2D; Wed, 3 Feb 2021 15:55:23 +0000 (UTC) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id D15BF6EB2A for ; Wed, 3 Feb 2021 15:55:21 +0000 (UTC) Received: by mail-oi1-f170.google.com with SMTP id h192so366791oib.1 for ; Wed, 03 Feb 2021 07:55:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qT9vhKEcJnv2UxHfk3LsH4oahpbnsqDoYZLdzv8tkwQ=; b=E+POGdeEfy4cxYsdfXjI2ckwzY0QeyuJkn2I1P/HG8m7VgVu3o6HpF6W4UOcHC68sR 2rIjQDFi6FTbBDeZC0NXbHVrnjMDnRzacZlHZVhrzhkkOwya2j/c1UUk9LGY7r/LIFUT K/AXfAgSK2e9bGGNmj+dZZa903rmSz2EHxg7lzWCptyC5PoFx1xaoTLp5e0G1klDMKpu Sweu8fGTTL3lL/lVIm/CaKSZatN4u8RU4KUSLai7PjtmhvgMiGKolv34XEgSn8TvVZvw C/0OdMqBY+BVAoME3lOAZ5Ra5WBOkp8a27y87ykM7zvTvlNjPz/QPSGj84sKadKJFvaG EnOw== X-Gm-Message-State: AOAM532fXXcLArHx5pojH8gqUlAKcyD+f7h/uM/oRV9QNBDtGTF+yz4n sDE3ACTe0MiaE5Ia6MDSb9w6VVr36w== X-Google-Smtp-Source: ABdhPJxmOBQcH5R+lFiUlGBqVbuj5kwZxcJFcUI25C3II5lOgKlwz+nfG7ePzMnfdKQ5jcv5RyiyOg== X-Received: by 2002:aca:4e13:: with SMTP id c19mr2424431oib.66.1612367721055; Wed, 03 Feb 2021 07:55:21 -0800 (PST) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o14sm481868oof.38.2021.02.03.07.55.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 07:55:19 -0800 (PST) Received: (nullmailer pid 1895243 invoked by uid 1000); Wed, 03 Feb 2021 15:55:17 -0000 Date: Wed, 3 Feb 2021 09:55:17 -0600 From: Rob Herring To: Geert Uytterhoeven Subject: Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas Message-ID: <20210203155517.GC3706951@robh.at.kernel.org> References: <20210202205544.24812-1-robh@kernel.org> <20210202205544.24812-3-robh@kernel.org> MIME-Version: 1.0 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: , Cc: Ulf Hansson , Tomer Maimon , Geert Uytterhoeven , Vincent Cheng , DRI Development , Tali Perry , Daniel Palmer , Linux I2C , Pavel Machek , Will Deacon , linux-clk , linux-leds , Florian Fainelli , Herbert Xu , Joerg Roedel , Daniel Lezcano , Vinod Koul , Kishon Vijay Abraham I , Bartosz Golaszewski , Chen-Yu Tsai , Joel Stanley , Guenter Roeck , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Watchdog Mailing List , Ray Jui , "open list:GPIO SUBSYSTEM" , Wim Van Sebroeck , Avi Fishman , Scott Branden , Stephen Boyd , Yoshihiro Shimoda , Linux MMC List , Linux Kernel Mailing List , Andrew Jeffery , Linux IOMMU , Linux Crypto Mailing List , "David S. Miller" , Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Feb 03, 2021 at 09:01:23AM +0100, Geert Uytterhoeven wrote: > Hi Rob, > > On Tue, Feb 2, 2021 at 9:55 PM Rob Herring wrote: > > Properties in if/then schemas weren't getting checked by the meta-schemas. > > Enabling meta-schema checks finds several errors. > > > > The use of an 'items' schema (as opposed to the list form) is wrong in > > some cases as it applies to all entries. 'contains' is the correct schema > > to use in the case of multiple entries. > > > Signed-off-by: Rob Herring > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > > +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > > @@ -81,9 +81,8 @@ properties: > > if: > > properties: > > compatible: > > - items: > > - enum: > > - - renesas,usb2-phy-r7s9210 > > + contains: > > + const: renesas,usb2-phy-r7s9210 > > Single entry, so "contains" not needed? No, you are misunderstanding how these work. 'contains' means at least one entry in an array passes with the subschema. In this case, 'renesas,usb2-phy-r7s9210' must appear somewhere in the 'compatible' values. (Before, it said *every* entry must be 'renesas,usb2-phy-r7s9210'.) As there is a fallback compatible, we need 'contains'. > > --- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > > +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > > @@ -76,11 +76,10 @@ required: > > if: > > properties: > > compatible: > > - items: > > - enum: > > - - renesas,pfc-r8a73a4 > > - - renesas,pfc-r8a7740 > > - - renesas,pfc-sh73a0 > > + enum: > > + - renesas,pfc-r8a73a4 > > + - renesas,pfc-r8a7740 > > + - renesas,pfc-sh73a0 > > Missing "contains"? No. In this case, 'compatible' is always a single entry, so no 'contains' needed (but would work). If compatible is one of these 3 strings, then the 'if' is true. The original way would actually work in this case (i.e. is valid json-schema), but we require 'items' to have a size (maxItems/minItems) in our meta-schema. Rob _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel