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: 419526 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1601644jaj; Mon, 12 Apr 2021 03:09:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDUoMoA5bte60lPGJE8Kv78i6bL52qzYm1A9DTSJyIhHPTW2NrogbB4gYl6wMT92bbTFCd X-Received: by 2002:a05:6a00:1585:b029:203:6bc9:3ca6 with SMTP id u5-20020a056a001585b02902036bc93ca6mr24309164pfk.79.1618222189811; Mon, 12 Apr 2021 03:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618222189; cv=none; d=google.com; s=arc-20160816; b=QtUAOiTdBYVYY300gpC53zhiJet6bG5PaX3NyS7w8ordE5EnSFkeaKdKaG8s8AY0ij CojSIRcMR0Rsq0acnRKJVmz9c59HwrkKGB6Miumh8oxqxZ3ZaxKdXxDYKU7paEhwFhrZ aCdvKWrTLEbnPepE9JEqWqdF8DpEGn3+N+rPDDKuXMSddELPZkcySl+hXW2LXkUScRzz vaEwSBGPBuENrxpV/+l0tBzWm0RTSmzrqKjj54Mo8FLw1KMMR6YiXkA06AWMTAUDeEkz mZ92sNxn/t6pZ+PE8kfBSm10/pemfG9UpnMcJnl3gMcuBy3a0O3VNyWIDhW990szMs70 fpGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FXaBn6AhW6uls3U6Uy/WKvDSZVtZdSpAyLyt6Tx9Dq0=; b=q1Ugqv5n+VXK/SZ0ejZMG02ibU28rvzXieIQ3lV/r7ITY8918Z0RU0EmRIpJaoXZ8/ CUid/yoriYS7xXuwD1PEmORWqZC4RRkzEm/4cSqtQFenbubSBrh03Pvmw93ufRBiuy1q /hFiAGlIST0Wu1j70hTIOdFBeC+GhBtax2AqcH/WOYAmt59nQVXRywYJwUe75/ZhuyPz /N7kGM/eu5nSF99iyQ2g8e2vSlxEO/qE0UIEoBXluIPtqXFR79nilOjK3NKEoShbkX7A m2+tIqKSpsyWdLXQFIRizcqLOiSgb+YDmfIyQyKiGVUkOSUAckz635au78urIZfcVY5a O1fQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si8734446pfo.97.2021.04.12.03.09.49; Mon, 12 Apr 2021 03:09:49 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238264AbhDLKKD (ORCPT + 6 others); 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 --- .../devicetree/bindings/sound/renesas,rsnd.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.26.0.106.g9fadedd Reviewed-by: Rob Herring 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: