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 X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E89E0C433ED for ; Mon, 12 Apr 2021 10:09:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAAA56101D for ; Mon, 12 Apr 2021 10:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238568AbhDLKKL (ORCPT ); Mon, 12 Apr 2021 06:10:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:16901 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238643AbhDLKH3 (ORCPT ); Mon, 12 Apr 2021 06:07:29 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FJkrD3ZtdzlXMT; Mon, 12 Apr 2021 18:05:16 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.179.202) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Mon, 12 Apr 2021 18:06:59 +0800 From: Zhen Lei To: Liam Girdwood , Mark Brown , "Rob Herring" , alsa-devel , devicetree , linux-kernel CC: Zhen Lei , Kuninori Morimoto Subject: [PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes Date: Mon, 12 Apr 2021 18:06:38 +0800 Message-ID: <20210412100638.3349-3-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20210412100638.3349-1-thunder.leizhen@huawei.com> References: <20210412100638.3349-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.179.202] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, if there are more than two ports, or if there is only one port but other properties(such as "#address-cells") is required, these ports are placed under the "ports" node. So add the schema of property "ports". Otherwise, warnings similar to the following will be reported: arch/arm64/boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dt.yaml: \ sound@ec500000: 'ports' does not match any of the regexes: \ '^rcar_sound,ctu$', '^rcar_sound,dai$', '^rcar_sound,dvc$', ... A given binding should just use 'ports' or 'port' depending on it's need. Both are not allowed at the same time. The check is done in "allOf". Signed-off-by: Zhen Lei --- .../devicetree/bindings/sound/renesas,rsnd.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index 384191ee497f534..32b10fc3789eeac 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -115,6 +115,12 @@ properties: $ref: audio-graph-port.yaml# unevaluatedProperties: false + ports: + $ref: /schemas/graph.yaml#/properties/ports + patternProperties: + '^port@[0-9]': + $ref: audio-graph-port.yaml# + # use patternProperties to avoid naming "xxx,yyy" issue patternProperties: "^rcar_sound,dvc$": @@ -258,6 +264,12 @@ required: - "#sound-dai-cells" allOf: + - if: + required: + - ports + then: + properties: + port: false - if: properties: compatible: -- 2.26.0.106.g9fadedd