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 8877CC433F5 for ; Fri, 3 Dec 2021 16:50:02 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=U1NSvDK+67N7jgsu1FOyL1FKN3mqdLb+Q2lqaE7C7Lc=; b=y5RFCg/5gIU561 Ztjr6kzPsJj2uAMtrsP7M2bvVSQLMVpm3wfWGuzoGOErqj7/UvRW+mw4v2MBkzJ8VlF0qGBhWp9Ka svhfN3PbejCFNGagfcoWVtJKXfdl5iyMJXNIYh8fDMz/pJX+G26Jv6AoAAcHHZuKEHhF6s1a28Vks 0Qyv9yXoVB9oDyn9l9/6CLqS7hmtjYnQHV/vnV/zbjL0JQI5gmM8/P6K1StHy69KT2dZZPmfY0/m1 2pPfjtQ5S9WMR+NRea1jKqEwaj8Kr5VdzUyE9grlIPU7o8YAAB42d78PxfKcql3jkICmjr0X8j13W AmB9CghJSiXe/lJffSlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtBjf-00Ga7Z-Tf; Fri, 03 Dec 2021 16:48:36 +0000 Received: from mail-ot1-f46.google.com ([209.85.210.46]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mtBjc-00Ga6D-B0 for linux-arm-kernel@lists.infradead.org; Fri, 03 Dec 2021 16:48:33 +0000 Received: by mail-ot1-f46.google.com with SMTP id r10-20020a056830080a00b0055c8fd2cebdso4019741ots.6 for ; Fri, 03 Dec 2021 08:48:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DucIAiyImd6ScqgVL+tzXcRs+jXZnm74TimktL+13K0=; b=teGQ+tsxQeGLUQjRItaqMFuYwVIOeFhjr0XVxOHDj+H5+W0O6bSaN6Utt0lFHrjQLb aeHQQWYBD1feREJ9kEyF5n4mukBuq/KhfFyLfVYFDpa1zPIZVWZIDDynINWH11Mwkocw AFqsoMXUtXk8zUBl1W1jQc0GxIHruxH2bu4u8UfWq+oCfECzXy0FKxUoLCQP2iH3lF7e 8nEEDrNW6bJC47aDA824H2qTKlC21LI592JjabWdvoh5vGzp2eNVR5OIV6pX6Xa3q589 4xjFTN951Jb+ySueX0Sz1OgNWrrO2hCjU37zTHB6Ow8wLJyhv5NS4jj7hw6+Ci1oA5KJ xfxQ== X-Gm-Message-State: AOAM5312qA9TEgM8WJcZHQEF3wYgvYz4q4zXO8AthB7/N4WgWdYRfApY vsFgOzZsd5zzZ3+ZNBHh5g== X-Google-Smtp-Source: ABdhPJwj2JQ7XI5sxmTvPRmdYr3Vbm+uClLekZEMV5SiLKpNu4homyPznWgikabFDjhZWM4kVAGxVA== X-Received: by 2002:a9d:4e93:: with SMTP id v19mr17417398otk.146.1638550110362; Fri, 03 Dec 2021 08:48:30 -0800 (PST) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id f12sm669328ote.75.2021.12.03.08.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 08:48:29 -0800 (PST) From: Rob Herring To: Laurent Pinchart Cc: devicetree@vger.kernel.org, Rui Miguel Silva , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dt-bindings: media: nxp, imx7-mipi-csi2: Drop bad if/then schema Date: Fri, 3 Dec 2021 10:48:28 -0600 Message-Id: <20211203164828.187642-1-robh@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211203_084832_398496_427D7782 X-CRM114-Status: GOOD ( 12.74 ) 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 The if/then schema for 'data-lanes' doesn't work as 'compatible' is at a different level than 'data-lanes'. To make it work, the if/then schema would have to be moved to the top level and then whole hierarchy of nodes down to 'data-lanes' created. I don't think it is worth the complexity to do that, so let's just drop it. The error in this schema is masked by a fixup in the tools causing the 'allOf' to get overwritten. Removing the fixup as part of moving to json-schema draft 2019-09 revealed the issue: Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi@30750000: ports:port@0:endpoint:data-lanes:0: [1] is too short From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi@32e30000: ports:port@0:endpoint:data-lanes:0: [1, 2, 3, 4] is too long From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml The if condition was always true because 'compatible' did not exist in 'endpoint' node and a non-existent property is true for json-schema. Fixes: 85b62ff2cb97 ("media: dt-bindings: media: nxp,imx7-mipi-csi2: Add i.MX8MM support") Cc: Rui Miguel Silva Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- v2: - Add note that imx7 only supports 2 lanes --- .../bindings/media/nxp,imx7-mipi-csi2.yaml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml index 877183cf4278..1ef849dc74d7 100644 --- a/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml +++ b/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml @@ -79,6 +79,8 @@ properties: properties: data-lanes: + description: + Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines. items: minItems: 1 maxItems: 4 @@ -91,18 +93,6 @@ properties: required: - data-lanes - allOf: - - if: - properties: - compatible: - contains: - const: fsl,imx7-mipi-csi2 - then: - properties: - data-lanes: - items: - maxItems: 2 - port@1: $ref: /schemas/graph.yaml#/properties/port description: -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3440C433F5 for ; Fri, 3 Dec 2021 16:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382172AbhLCQvz (ORCPT ); Fri, 3 Dec 2021 11:51:55 -0500 Received: from mail-ot1-f50.google.com ([209.85.210.50]:35499 "EHLO mail-ot1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbhLCQvy (ORCPT ); Fri, 3 Dec 2021 11:51:54 -0500 Received: by mail-ot1-f50.google.com with SMTP id x43-20020a056830246b00b00570d09d34ebso4078700otr.2; Fri, 03 Dec 2021 08:48:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DucIAiyImd6ScqgVL+tzXcRs+jXZnm74TimktL+13K0=; b=NxWVYJ/S3d9zsSBysrzOXbq4bk574im9MNJz7y34RYD8QouLOGAeZd2Vwvn0ruc1ou NtgDE11qd6uyRYNotr6yLtR1nG4fhejudw90Yfub4dOQE3Veoo4w2ncpbcV2fJr9nbPr bPgFSlW96MzuTER257RBV9kLPnF4rXiU1C8lS235QbPzOg7x4VW15Oj4AdIbs46SnDZ8 ffafgbphshjHDv0f0CBSa1vVfyrzeOZ/uIAEP8HrYyq+jt6mVbjChGTWrfelYYvIpGjy 2hHUHYd7Dd/a8wPAszyeP/p7whsY/v0/J/qF3Qdq4PU/R94/eMxY2z+H3JN0uEoc0bnr PpaA== X-Gm-Message-State: AOAM530z9uYGElSjhNdRtZ991klqXmtFWiZGCkOpMcoZpaDL8iRwnr/U OYj01yZ924u//8kuorsfVw== X-Google-Smtp-Source: ABdhPJwj2JQ7XI5sxmTvPRmdYr3Vbm+uClLekZEMV5SiLKpNu4homyPznWgikabFDjhZWM4kVAGxVA== X-Received: by 2002:a9d:4e93:: with SMTP id v19mr17417398otk.146.1638550110362; Fri, 03 Dec 2021 08:48:30 -0800 (PST) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id f12sm669328ote.75.2021.12.03.08.48.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 08:48:29 -0800 (PST) From: Rob Herring To: Laurent Pinchart Cc: devicetree@vger.kernel.org, Rui Miguel Silva , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dt-bindings: media: nxp,imx7-mipi-csi2: Drop bad if/then schema Date: Fri, 3 Dec 2021 10:48:28 -0600 Message-Id: <20211203164828.187642-1-robh@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The if/then schema for 'data-lanes' doesn't work as 'compatible' is at a different level than 'data-lanes'. To make it work, the if/then schema would have to be moved to the top level and then whole hierarchy of nodes down to 'data-lanes' created. I don't think it is worth the complexity to do that, so let's just drop it. The error in this schema is masked by a fixup in the tools causing the 'allOf' to get overwritten. Removing the fixup as part of moving to json-schema draft 2019-09 revealed the issue: Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi@30750000: ports:port@0:endpoint:data-lanes:0: [1] is too short From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.example.dt.yaml: mipi-csi@32e30000: ports:port@0:endpoint:data-lanes:0: [1, 2, 3, 4] is too long From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml The if condition was always true because 'compatible' did not exist in 'endpoint' node and a non-existent property is true for json-schema. Fixes: 85b62ff2cb97 ("media: dt-bindings: media: nxp,imx7-mipi-csi2: Add i.MX8MM support") Cc: Rui Miguel Silva Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- v2: - Add note that imx7 only supports 2 lanes --- .../bindings/media/nxp,imx7-mipi-csi2.yaml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml index 877183cf4278..1ef849dc74d7 100644 --- a/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml +++ b/Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml @@ -79,6 +79,8 @@ properties: properties: data-lanes: + description: + Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines. items: minItems: 1 maxItems: 4 @@ -91,18 +93,6 @@ properties: required: - data-lanes - allOf: - - if: - properties: - compatible: - contains: - const: fsl,imx7-mipi-csi2 - then: - properties: - data-lanes: - items: - maxItems: 2 - port@1: $ref: /schemas/graph.yaml#/properties/port description: -- 2.32.0