From patchwork Mon Apr 12 10:06:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 1465099 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4FJkxV1WvCz9sVm for ; Mon, 12 Apr 2021 20:09:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238264AbhDLKKD (ORCPT ); Mon, 12 Apr 2021 06:10:03 -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 X-Originating-IP: [10.174.179.202] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Reviewed-by: Rob Herring --- .../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: