From patchwork Thu May 25 05:02:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William Zhang X-Patchwork-Id: 13254771 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 252ECC77B7E for ; Thu, 25 May 2023 05:03:43 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=Qe8AEZGRChcLqBSF0Dgn8FVbXvh7q/w6yCrHesJs62c=; b=yo4 Q5hn98VdTiHkAWsojD4Sr7+1daz/Ewv+PC8oFa5UX6xsxiVS9PgIr1rJX5c40vQE0fVlMtkUNZltV wKRivR4UBC0nMTXzDq19EoyCI3nupzyEakS4nHUbVTywGCjQCDApBMOL1X0fvkIbmW6QV8oV1FpDj FAzzlfX/PctEHkvSv2tkYTzCUi6uF1gEtotH3gk3u0gkdOWrJKQsXoI37dTMzEPXwSFvTsnOY2jaD nzinrixASgynECR5TKPOm1eTqb8TBUwMV6v+0kq6TxU/d/KQOT2oy/hwBxdm5Laq7kN1FE1IiHFET OQii3nWNX7ds8cti391ZKLP/kZoSpRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q2381-00FXLS-2m; Thu, 25 May 2023 05:03:09 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q237y-00FXKX-2e for linux-arm-kernel@lists.infradead.org; Thu, 25 May 2023 05:03:08 +0000 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-623a5f60355so4908876d6.1 for ; Wed, 24 May 2023 22:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1684990980; x=1687582980; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=sDO+UC+Wlq1BSkJx1QUye4GQb1trwR2i2t+ckSOo3S8=; b=dbrVVV75ZB9eHf0k2uRxfxlCQ8UJgFXb9bf1MugnUJH2KkC0HwLc0mfxgKMYOOvFc+ +XXlKB7EE3y9SNIjWkETTa/5p6/ySmbBN2bGTMI/BzAfvWJ2htQ35yT3Eh8XwjtMIK6X frRcuuJnWOyVVUEZ9rVtH5Wf3DMFiWZukfOzk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684990980; x=1687582980; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=sDO+UC+Wlq1BSkJx1QUye4GQb1trwR2i2t+ckSOo3S8=; b=WNKy8TrTsXk30mk673PSJwDulmXhr9GXkCARqjLSK7fOJP4OPpRZiAK+mk1joXhdOB nsgylqetR90ZsYix5McwZhfpmAhCMX0BFLMBDfm++qAiVpsmB0MlH463+Dlz3tR5A/cw gJcsB9twZsIWXzHav46Dm7JYuRiZRq2Ail/OPqht5Mbo14L4gMmFiiuZZCaUegAe7wal HC9qATVImypX6+SU7Gp8OTNZ8smTQS8BFs0YAFK+rP5+PcAqvAID9tyKOV3mCnyDv7Xf yb64ceF6GHz6MjoZeIR3Cr14b5UbAKTywQmTo+VNMDUf9oVStyLt1PxBmScvLDKyFoS3 KfCw== X-Gm-Message-State: AC+VfDzZOoNh6em2on3oTXK2QDoZ0AUPfRVcL00WHyS+rFPYiTTEsaKz Z332gxw2itIrNFRktDbK2pA1/Q== X-Google-Smtp-Source: ACHHUZ77lEgSG5ADjf32VlNsIy6GIxANPizdHzwQzEYsnIYt3zoRZdOLvwDpsj+l/aVe6ORnYeMArw== X-Received: by 2002:a05:6214:c43:b0:5ef:6eb6:e26e with SMTP id r3-20020a0562140c4300b005ef6eb6e26emr249082qvj.6.1684990980491; Wed, 24 May 2023 22:03:00 -0700 (PDT) Received: from ubuntu-22.localdomain (c-73-93-62-92.hsd1.ca.comcast.net. [73.93.62.92]) by smtp.gmail.com with ESMTPSA id q5-20020a0cfa05000000b0061b73e331b2sm147332qvn.30.2023.05.24.22.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 22:02:59 -0700 (PDT) From: William Zhang To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: William Zhang , f.fainelli@gmail.com, Krzysztof Kozlowski , Rob Herring Subject: dt_binding_check report false alarm? Date: Wed, 24 May 2023 22:02:41 -0700 Message-Id: <20230525050241.3700-1-william.zhang@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230524_220306_971066_C978C3C1 X-CRM114-Status: GOOD ( 12.66 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, It seems dt_binding_check reports a false error when run on this modified yaml. I picked this simple file just to demostrate this issue. Basically I made the interrupts and interrupt-names as optional properties. But when there are two interrupts present, then interrupt-names are required. However in the example, I don't define interrupts and interrupt-name at all, the dt binding check reports error that interrupt-names are required: make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/crypto/fsl-imx-scc.yaml LINT Documentation/devicetree/bindings CHKDT Documentation/devicetree/bindings/processed-schema.json SCHEMA Documentation/devicetree/bindings/processed-schema.json DTEX Documentation/devicetree/bindings/crypto/fsl-imx-scc.example.dts DTC_CHK Documentation/devicetree/bindings/crypto/fsl-imx-scc.example.dtb Documentation/devicetree/bindings/crypto/fsl-imx-scc.example.dtb: crypto@53fac000: 'interrupt-names' is a required property From schema: /home/william/projects/linux/Documentation/devicetree/bindings/crypto/fsl-imx-scc.yaml This does not make sense to me as name is required only when there are two interrupts. Can someone familar with this please help to check if I miss anything in the yaml file or it is indeed a bug in binding check? Thanks, William --- .../devicetree/bindings/crypto/fsl-imx-scc.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-scc.yaml b/Documentation/devicetree/bindings/crypto/fsl-imx-scc.yaml index 563a31605d2b..c37a3a64a78c 100644 --- a/Documentation/devicetree/bindings/crypto/fsl-imx-scc.yaml +++ b/Documentation/devicetree/bindings/crypto/fsl-imx-scc.yaml @@ -32,11 +32,18 @@ properties: clock-names: const: ipg +allOf: + - if: + properties: + interrupts: + minItems: 2 + then: + required: + - interrupt-names + required: - compatible - reg - - interrupts - - interrupt-names - clocks - clock-names @@ -49,6 +56,4 @@ examples: reg = <0x53fac000 0x4000>; clocks = <&clks 111>; clock-names = "ipg"; - interrupts = <49>, <50>; - interrupt-names = "scm", "smn"; };