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 380E3C77B73 for ; Wed, 19 Apr 2023 08:57:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232809AbjDSI5N (ORCPT ); Wed, 19 Apr 2023 04:57:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232776AbjDSI5B (ORCPT ); Wed, 19 Apr 2023 04:57:01 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3582118D6 for ; Wed, 19 Apr 2023 01:56:58 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id ud9so79496849ejc.7 for ; Wed, 19 Apr 2023 01:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681894617; x=1684486617; 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=mFuzy4TuvFqYZVB9yIonpVvfyyHxImCxfwDErPMQgRg=; b=H/iMr/DovWLHt2YCjeW6aLfRxx2KGDYSy/hsKKdRIiNQKmpU9pgW72ZIATuskwh2gK GPWY+4ijiNsyeM+X4Dbf7/YsVp23JLhKLRC6kcInZXIlj+ZHf+E6rLY8R3slKcoER14e oolLGqzzPaJX8IkBrpJpwcP7ZQMMnl5zUgQca6wpzbKSkAPDcyqEDwds585KkzrMAQoO Dod9TgyryqBl6bb8iOWLH6zWlaYfhOcMN/q5of2nXEtHI1u52DMhLtJA5CSrFGAcLNy1 A+DJhj/85CcQFOg9iz3jbKKDywW0wP/I3HBB/u9J3zdFiuzvjTcqRuuxIG1RGNMdwrUJ SHRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681894617; x=1684486617; 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=mFuzy4TuvFqYZVB9yIonpVvfyyHxImCxfwDErPMQgRg=; b=Wr8YbVEyS5cPe5Y/EsY4zjoEexzme8XCxsbcnywsvBXE8IT9UhVpadshH7wMJM8bBT BaPcIYyNq0QqO/QL5CDpnmxuS7Dkv6cbXoKS95UKlPHAena2f485bPuDTbCfklyQPsfa TsI3f6mkA1N/O59WFTL1osULZuWyanU8dCMk3YRbu2+UZT+uEOwERH2BLZo5yVDorn+Z JfhAraqk3e7o2cn35ouu0bOmjRHpa1ZV8utl7frp/38IpoRE/C+sv4ceNBJVh1O9P2hx iOQnJoiWkXzsnMpPeBLRdfnwMT9rW64c7rQU9fCfaWKP5g6+CKagCHBbccokDQhsSPpX wXNw== X-Gm-Message-State: AAQBX9f7ZjBqkt6tegVky3TM3WUW4iBP1onZf8hxIw8cJWr0RE7zalPz 9pDiTxF1A6HRZMG+VWQp4yxakw== X-Google-Smtp-Source: AKy350ZHhQqP60s84sOXg5hEoFCicZMMdVpYkZ1g5erVI/+cot6zkgX/52ioHeJ+kkdg+Elklcr+nw== X-Received: by 2002:a17:907:9805:b0:94f:3cf5:6d7f with SMTP id ji5-20020a170907980500b0094f3cf56d7fmr13114320ejc.46.1681894617176; Wed, 19 Apr 2023 01:56:57 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:62f5:eb43:f726:5fee? ([2a02:810d:15c0:828:62f5:eb43:f726:5fee]) by smtp.gmail.com with ESMTPSA id be5-20020a1709070a4500b0094f282fc29asm5844742ejc.207.2023.04.19.01.56.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 01:56:56 -0700 (PDT) Message-ID: <77d94fe0-75d2-8f64-19c6-fc19438ba71a@linaro.org> Date: Wed, 19 Apr 2023 10:56:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] dt-bindings: display: panel: add common definition of ports Content-Language: en-US To: Rob Herring Cc: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Krzysztof Kozlowski , Thierry Reding , Laurent Pinchart , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio References: <20230416153929.356330-1-krzysztof.kozlowski@linaro.org> <20230418222613.GA2408838-robh@kernel.org> From: Krzysztof Kozlowski In-Reply-To: <20230418222613.GA2408838-robh@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/04/2023 00:26, Rob Herring wrote: > On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote: >> Few panel bindings for dual-link connections just type "ports: true", >> which does not enforce any type. Add common definition of ports, so the >> type will be fixed. >> >> Signed-off-by: Krzysztof Kozlowski >> >> --- >> >> Cc: Konrad Dybcio >> --- >> .../bindings/display/panel/panel-common.yaml | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml >> index 5b38dc89cb21..ad62d34e6fa3 100644 >> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml >> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml >> @@ -70,6 +70,16 @@ properties: >> port: >> $ref: /schemas/graph.yaml#/properties/port >> >> + # For dual-link connections >> + ports: >> + $ref: /schemas/graph.yaml#/properties/ports >> + patternProperties: >> + "^port@[0-9a-f]+$": >> + $ref: /schemas/graph.yaml#/$defs/port-base > > This allows any undocumented property. Yes, which I hope the device schema (using this panel-common) will narrow with additionalProperties: false. I can make it explicit: additionalProperties: true. Otherwise, how do I allow custom properties like: Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml > >> + >> + required: >> + - port@0 >> + > > I don't think this should be added here because users must define what > each port is. With it here, we're going to validate the nodes twice as > well. Same can be said for 'port' though. It can't be extended though. So you propose to drop entire "ports" here and expect every panel schema to define it instead? Best regards, Krzysztof 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8359CC6FD18 for ; Wed, 19 Apr 2023 08:57:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A5D110E0BA; Wed, 19 Apr 2023 08:57:03 +0000 (UTC) Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by gabe.freedesktop.org (Postfix) with ESMTPS id C021610E0BA for ; Wed, 19 Apr 2023 08:57:01 +0000 (UTC) Received: by mail-ej1-x635.google.com with SMTP id dm2so79810612ejc.8 for ; Wed, 19 Apr 2023 01:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681894617; x=1684486617; 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=mFuzy4TuvFqYZVB9yIonpVvfyyHxImCxfwDErPMQgRg=; b=H/iMr/DovWLHt2YCjeW6aLfRxx2KGDYSy/hsKKdRIiNQKmpU9pgW72ZIATuskwh2gK GPWY+4ijiNsyeM+X4Dbf7/YsVp23JLhKLRC6kcInZXIlj+ZHf+E6rLY8R3slKcoER14e oolLGqzzPaJX8IkBrpJpwcP7ZQMMnl5zUgQca6wpzbKSkAPDcyqEDwds585KkzrMAQoO Dod9TgyryqBl6bb8iOWLH6zWlaYfhOcMN/q5of2nXEtHI1u52DMhLtJA5CSrFGAcLNy1 A+DJhj/85CcQFOg9iz3jbKKDywW0wP/I3HBB/u9J3zdFiuzvjTcqRuuxIG1RGNMdwrUJ SHRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681894617; x=1684486617; 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=mFuzy4TuvFqYZVB9yIonpVvfyyHxImCxfwDErPMQgRg=; b=LEy+/ggorkIVlsM4XAYGlMebD/TieqchIjoargHk+zvbMIk91DCEstfb/6cUx2DO3e os8dVEnvX6tI9VeeysNgMCoPJuPlsZBo3R0XqPSp7oLP8tF8LRTSYDRlb07CuJGbwSji Hy6zUD22w3xjVwacbyOnmWWXa93FhIhhytg88MulpJwwIZiEZ0UHI+YOci8XQRjtBYTs teKBU9+Bj0mtv/cMVfhN1LrLooHN7zmhix1aBMxCKb/5vTeHkE1gXps957S3c6I2TPDr aOA/BJODDbOyjD0XQ90eTURhiaTd9xY00k0JrEriyUdC7afbuHuAi7Fb9MH78kv0xLXQ 4mlg== X-Gm-Message-State: AAQBX9fBQHSwHd4FcHzgRXZcyDqNYFQqDBYaVqjNwKFSfzOR94V8HF67 4aTrT+WCbfvbXz3N1MKu552fEQ== X-Google-Smtp-Source: AKy350ZHhQqP60s84sOXg5hEoFCicZMMdVpYkZ1g5erVI/+cot6zkgX/52ioHeJ+kkdg+Elklcr+nw== X-Received: by 2002:a17:907:9805:b0:94f:3cf5:6d7f with SMTP id ji5-20020a170907980500b0094f3cf56d7fmr13114320ejc.46.1681894617176; Wed, 19 Apr 2023 01:56:57 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:62f5:eb43:f726:5fee? ([2a02:810d:15c0:828:62f5:eb43:f726:5fee]) by smtp.gmail.com with ESMTPSA id be5-20020a1709070a4500b0094f282fc29asm5844742ejc.207.2023.04.19.01.56.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 01:56:56 -0700 (PDT) Message-ID: <77d94fe0-75d2-8f64-19c6-fc19438ba71a@linaro.org> Date: Wed, 19 Apr 2023 10:56:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH] dt-bindings: display: panel: add common definition of ports Content-Language: en-US To: Rob Herring References: <20230416153929.356330-1-krzysztof.kozlowski@linaro.org> <20230418222613.GA2408838-robh@kernel.org> From: Krzysztof Kozlowski In-Reply-To: <20230418222613.GA2408838-robh@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Neil Armstrong , Laurent Pinchart , devicetree@vger.kernel.org, Sam Ravnborg , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Konrad Dybcio , Thierry Reding , Krzysztof Kozlowski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 19/04/2023 00:26, Rob Herring wrote: > On Sun, Apr 16, 2023 at 05:39:29PM +0200, Krzysztof Kozlowski wrote: >> Few panel bindings for dual-link connections just type "ports: true", >> which does not enforce any type. Add common definition of ports, so the >> type will be fixed. >> >> Signed-off-by: Krzysztof Kozlowski >> >> --- >> >> Cc: Konrad Dybcio >> --- >> .../bindings/display/panel/panel-common.yaml | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml >> index 5b38dc89cb21..ad62d34e6fa3 100644 >> --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml >> +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml >> @@ -70,6 +70,16 @@ properties: >> port: >> $ref: /schemas/graph.yaml#/properties/port >> >> + # For dual-link connections >> + ports: >> + $ref: /schemas/graph.yaml#/properties/ports >> + patternProperties: >> + "^port@[0-9a-f]+$": >> + $ref: /schemas/graph.yaml#/$defs/port-base > > This allows any undocumented property. Yes, which I hope the device schema (using this panel-common) will narrow with additionalProperties: false. I can make it explicit: additionalProperties: true. Otherwise, how do I allow custom properties like: Documentation/devicetree/bindings/display/panel/advantech,idk-2121wr.yaml > >> + >> + required: >> + - port@0 >> + > > I don't think this should be added here because users must define what > each port is. With it here, we're going to validate the nodes twice as > well. Same can be said for 'port' though. It can't be extended though. So you propose to drop entire "ports" here and expect every panel schema to define it instead? Best regards, Krzysztof