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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3E09CC54EBE for ; Fri, 13 Jan 2023 16:52:56 +0000 (UTC) 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:In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wti8ikag8t36MrdaiG4IRxC+Ngy8za/vz5Ru2gC0ig8=; b=tXHnPvyttWGECh ZtK9zidBJ/vFSHlKaXA+Ot+vIWFydf7dSNyeRTKn+7gFRE5vnkUpktLO88qS9tO5RX0R5OLNJduFF HN49HWpNd8qt4CvL00PT6pXOcdojkNeJf3nDeEfmzty7H2YUIkaGcFtrry2kt2/3LPEQScdrY5MD8 lbLnvyqOtCtz7LHmo7W9V9Z+XtbyrzFwovU37trgvUYhlbEbZP3ZKRrEBVWKMUVxPGRmbNK8SxX3N dqsUTh3aOzegZqzzyv3Rj0RZV9OkG7kt3Ndawpgs3F6Z9v8E9S5v9OXCr3g8M4BkllyLFkoIZ1GZ3 LkYtg8kdIwuJbUiteFtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGNHW-003WT3-Kp; Fri, 13 Jan 2023 16:51:54 +0000 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGNHR-003WRC-Sv for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 16:51:53 +0000 Received: by mail-ej1-x62e.google.com with SMTP id u19so53602618ejm.8 for ; Fri, 13 Jan 2023 08:51:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=n5VKVZUHVx22mM/bIIAc7NzbLe37QkHYvE9f9wX8QW8=; b=vNsbnSKz1GdnDcjANX07Eh1TPUTsE3sZz4UgqxgIxPPW1iAvFUpAcCBfG/px0AQ+Nf Bn7Qt61/Rolm0QvEF1QdUwcMezQrgIoX3FVVZDMRpUXUB2x4IAViej4ai7DTtfGYzbT8 yqIfFZamQr5RV55GiRchpqmvnS5MlwzEnAJX/01cW51i0ukHdpdXWZ83gX57+O/8E6J9 Qc/gWHCbHTk+sCrrnLRPZrA96jKyX5RcZhlxAi7CpSRd25K9r6vWzCiRrz0a3kjaF/ZT iSTQBvsQ40vxKmQ/wE+GgDL8Ht09aPRqv0en/qSBBMmtKfuq9KzW6bfHy8IgqpCnOO/d JiZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n5VKVZUHVx22mM/bIIAc7NzbLe37QkHYvE9f9wX8QW8=; b=Ei/0vDWlmWv29Vh1Nhrr5GcX5GOvyQmeDPsDFZR7QZtKD/GhO/Ctmf+O3gXqihtNnA cDyYJuKSF3P4WFJG3L4mXlNKv0twSCH0ILQ5n+k2i5s8xceX0PjKmuoso3XK/ZmFLtXp A1guDkQyDLZeEJxKSzszVLFDZ2ZAa8AF8jVX86txqQqsZLdk9QqT4gEQ2UlW7T65piOn sh7DU6sQR3sbcs8umC+y4EszuEZQRc2wlGqEBg2CIRztLZfmLeJOvJsyHoGb9dgrRba1 MMRRfJPUkFjwac4H5YADg4OXooQKwpx4XIuHar+ySCUHlPINzGWOcXbjYIRPzpLymwQZ Encw== X-Gm-Message-State: AFqh2koiWrGbRjMEgWqLp6+S1YG4lscLXApn0xJBI6YpjA+P8BT39fTJ T5kEdPUG+RJyv2Oajpnw1AaiGQ== X-Google-Smtp-Source: AMrXdXu+6c75vpvRqaVKxqv3ZA98GJYV1k02Wwz15Qn+yFXkdoMJMK6NmJ348MKGwxaHj3pZHARWPg== X-Received: by 2002:a17:906:c18d:b0:843:770e:777d with SMTP id g13-20020a170906c18d00b00843770e777dmr68623230ejz.11.1673628706634; Fri, 13 Jan 2023 08:51:46 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id en6-20020a056402528600b00499b3d09bd2sm6192043edb.91.2023.01.13.08.51.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Jan 2023 08:51:46 -0800 (PST) Message-ID: <58d9c99d-942a-7d55-64dc-31d936076b90@linaro.org> Date: Fri, 13 Jan 2023 17:51:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2 01/16] dt-bindings: media: fsl-pxp: convert to yaml Content-Language: en-US To: Michael Tretter , linux-media@vger.kernel.org, devicetree@vger.kernel.org, Philipp Zabel , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Fabio Estevam , Alexander Stein , kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org References: <20230112-imx-pxp-v2-0-e2281da1db55@pengutronix.de> <20230112-imx-pxp-v2-1-e2281da1db55@pengutronix.de> <20230113150943.GC20866@pengutronix.de> From: Krzysztof Kozlowski In-Reply-To: <20230113150943.GC20866@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_085149_966412_53542BB9 X-CRM114-Status: GOOD ( 18.99 ) 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 13/01/2023 16:09, Michael Tretter wrote: >>> +properties: >>> + compatible: >>> + oneOf: >>> + - const: fsl,imx6ul-pxp >>> + - const: fsl,imx6ull-pxp >>> + - const: fsl,imx7d-pxp >> >> These three are an enum. > > These are alternatives to the 'items:' entry below. > > Are you suggesting to use the following statement? > > oneOf: > - enum: > - fsl,imx6ul-pxp > - fsl,imx6ull-pxp > - fsl,imx7d-pxp > - items: > - enum: > - fsl,imx6sll-pxp > - fsl,imx6sx-pxp Yes. > > Why is this better than the one that I used? Because that's the convention - use enum for enumeration which nicely groups all of them and is the easiest to read. > >> >>> + - items: >>> + - enum: >>> + - fsl,imx6sll-pxp >>> + - fsl,imx6sx-pxp >>> + - const: fsl,imx6ull-pxp >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + interrupts: >>> + minItems: 1 >>> + maxItems: 2 >>> + >>> + clocks: >>> + maxItems: 1 >>> + >>> + clock-names: >>> + const: axi >>> + >>> +required: >>> + - compatible >>> + - reg >>> + - interrupts >>> + - clocks >>> + - clock-names >>> + >>> +allOf: >>> + - if: >>> + properties: >>> + compatible: >>> + contains: >>> + enum: >>> + - fsl,imx6sx-pxp >>> + then: >>> + properties: >>> + interrupts: >>> + numItems: 1 >> >> That's not correct syntax... I am surprised that it works. Did you test >> the bindings? > > I copied this syntax from renesas,wdt.yaml and ran > > make ARCH=arm dtbs_check DT_SCHEMA_FILES=fsl,imx6ull-pxp.yaml > > with SOC_IMX7D=y, SOC_IMX6UL=y, SOC_IMX6SLL=y, and SOC_IMX6SX=y. The latter > two were not enabled in the v1, which is why it didn't catch the missing > compatibles. > > On a closer look, I just saw that the checker ignored the schema due to the > incorrect syntax and didn't produce any further errors. With the syntax fixed, > the checker now produces also a few more errors about power-domains, which I > will fix in v3. > > Is this syntax correct? > > allOf: > - if: > properties: > compatible: > contains: > enum: > - fsl,imx6sx-pxp > then: > properties: > interrupts: > minItems: 1 Drop this one > maxItems: 1 > else: > properties: > interrupts: > minItems: 2 > maxItems: 2 > > Michael Rest is ok Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel