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 0F0D6C46467 for ; Tue, 3 Jan 2023 11:28:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236950AbjACL2R (ORCPT ); Tue, 3 Jan 2023 06:28:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232879AbjACL2Q (ORCPT ); Tue, 3 Jan 2023 06:28:16 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24B35D10A for ; Tue, 3 Jan 2023 03:28:15 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id bt23so28593073lfb.5 for ; Tue, 03 Jan 2023 03:28:15 -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:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kE4qqRxLpxxCedBuUJYA+jounttnp3G/CGQUAy2owUc=; b=Ill95URu0ok8mTKcTGS2lBtZw4eZqXOgHuXYKVuUbo61K1thYXNo+Ruh9Glym7puZ0 zX+XPzU9HkF5NtDV9G9rXGtsfzmAOJikoXWin/OvNxtIq8uqfGhYmtrAPSEAsiU7V1Y5 oLVnULMbddELmoYJH5P78lCIHYZt6Xd4d5rGEnQ+jRQhTspmocjmECdaqb2f976PdL2z TzHa+su9MOIZrwYWj4CqUurmPyIyctOCVXkevmsCzEw1W+ZEN/+9kvMz0UXZ0GelNyM3 ylERXrH6lkJrnMQzYqxWIvb8GHGOvWjgDwWntvVljGUDLd3hptx9gakn71TA3mAo2Yrd L9gA== 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:cc: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=kE4qqRxLpxxCedBuUJYA+jounttnp3G/CGQUAy2owUc=; b=I/lC7PBT9j9ahDnPpOZdifZ01pTbVHpq68izDe5A1X6O8VGRdyNFNQuG0651Jo9P5s bd3kozQ6XxBGF8lQcAWquBESB+jwsB/vY+3EzM3Yy1MHwmbFxxfJ1Q+PgmWGdvtkIbSd /FpwkQz2jvekSvig0F3QRTmg5acybF0hwnjrBGkPthkl6OzkDJF4rJz0JyFDOOpZcZyy 3Q0yuYc/8gc5//xrckyogQ/jaRQLdQqtJCQoM6yp/INaaD3/vz4SmK7HUOk5k/eTMcUA xQWpox/da23xVEi7zCPjylfu0riQwEQa6170+jd+7kYYAOoNvneTPPSqhZX6SrGpre4k vOVA== X-Gm-Message-State: AFqh2kopUa/l5dMzPTlP7SgjHt60kIge+2PgZ39o36dQgy0Aym+jySbC ynCgY1nmKCbM7R7AgN4S++UKYw== X-Google-Smtp-Source: AMrXdXvivJCiSvdg7M62GVqjA581ZqA/tb1WZnOzpgmcCBvtTZ9QkS3notudi/QiV+FIM4Pn1tKE8Q== X-Received: by 2002:a05:6512:3601:b0:4b7:13b:259d with SMTP id f1-20020a056512360100b004b7013b259dmr10839992lfs.48.1672745293524; Tue, 03 Jan 2023 03:28:13 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id o10-20020ac24e8a000000b004b4fefacd89sm4798236lfr.139.2023.01.03.03.28.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Jan 2023 03:28:13 -0800 (PST) Message-ID: <30423568-df03-1d72-81fe-3a4b33214e5c@linaro.org> Date: Tue, 3 Jan 2023 12:28:11 +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: [RFC PATCH 3/4] dt-bindings: panel: Introduce dual-link LVDS panel Content-Language: en-US To: Aradhya Bhatia , Rob Herring , Krzysztof Kozlowski , Tomi Valkeinen , Jyri Sarha , David Airlie , Daniel Vetter , Laurent Pinchart , Thierry Reding , Sam Ravnborg , Maxime Ripard , Liam Girdwood , Mark Brown , Lad Prabhakar , Paul Walmsley , Palmer Dabbelt , Albert Ou , Matthias Brugger , Guo Ren Cc: DRI Development List , Devicetree List , Linux Kernel List , Linux RISC-V List , Linux ARM Kernel List , Linux Mediatek List , Linux C-SKY Arch List , Nishanth Menon , Vignesh Raghavendra , Rahul T R , Devarsh Thakkar , Jai Luthra , Jayesh Choudhary References: <20230103064615.5311-1-a-bhatia1@ti.com> <20230103064615.5311-4-a-bhatia1@ti.com> <85837957-f6d2-4722-7693-98c6cf932096@linaro.org> <32d66fb7-6c63-0985-222f-0bd3c36c165d@ti.com> From: Krzysztof Kozlowski In-Reply-To: <32d66fb7-6c63-0985-222f-0bd3c36c165d@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 03/01/2023 12:02, Aradhya Bhatia wrote: > But this is throwing an error. I am confused what else could be done. > Can you please suggest what might be a more accurate check here? > >> >>> + required: >>> + - dual-lvds-odd-pixels >>> + then: >>> + properties: >>> + port@1: >>> + properties: >>> + dual-lvds-even-pixels: true >>> + dual-lvds-odd-pixels: false >> >> Why do you need this? Your oneOf before already solves it. > > I agree with your comment here. It makes sense to only have > > dual-lvds-even-pixels: true > > and have the oneOf condition take care of the other. But, I just tested > this and it was unable to pick-up this intentionally-added error. > > I added 'dual-lvds-odd-pixels' property to both the nodes, and > dt_binding_check passes successfully (which it should have not.) > > Instead, if I only keep this, > > dual-lvds-odd-pixels: false > > then the dt_binding_check detects the error as it should. > > Regardless, I am curious why the first method doesn't work. Will try to > explore more on that. The check for presence of properties is only against required:, but you added there properties. Like this: https://elixir.bootlin.com/linux/v5.17-rc2/source/Documentation/devicetree/bindings/mfd/samsung,s5m8767.yaml#L155 Other way is to drop your both oneOf and entire allOf from ports and use: oneOf: - properties: ports: $ref: /schemas/graph.yaml#/properties/ports properties: port@0: required: - dual-lvds-odd-pixels port@1: required: - dual-lvds-even-pixels - properties: ports: $ref: /schemas/graph.yaml#/properties/ports properties: port@1: required: - dual-lvds-odd-pixels port@0: required: - dual-lvds-even-pixels Best regards, Krzysztof