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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 9485CC433B4 for ; Thu, 8 Apr 2021 12:28:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74E3A610FB for ; Thu, 8 Apr 2021 12:28:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231132AbhDHM21 (ORCPT ); Thu, 8 Apr 2021 08:28:27 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:16842 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbhDHM2Z (ORCPT ); Thu, 8 Apr 2021 08:28:25 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FGL8S4DC9z7tyl; Thu, 8 Apr 2021 20:26:00 +0800 (CST) Received: from [127.0.0.1] (10.174.179.202) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.498.0; Thu, 8 Apr 2021 20:28:09 +0800 Subject: Re: [PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes From: "Leizhen (ThunderTown)" To: Rob Herring CC: Liam Girdwood , Mark Brown , alsa-devel , devicetree , linux-kernel , Kuninori Morimoto References: <20210331091616.2306-1-thunder.leizhen@huawei.com> <20210331091616.2306-3-thunder.leizhen@huawei.com> <20210401202056.GA947212@robh.at.kernel.org> Message-ID: <15a406ba-b288-c98c-46f1-36933c11fb11@huawei.com> Date: Thu, 8 Apr 2021 20:28:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.202] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/4/7 10:04, Leizhen (ThunderTown) wrote: > > > On 2021/4/2 4:20, Rob Herring wrote: >> On Wed, Mar 31, 2021 at 05:16:16PM +0800, Zhen Lei wrote: >>> 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". >> >> A given binding should just use 'ports' or 'port' depending on it's >> need. Supporting both forms is needless complexity. Hi Rob: I don't think of a good way to avoid "port" and "ports" to be used at the same time. Should I disable the use of "port"? Convert the two usages of "port" into "ports". But usually no one will use both of them in one dts file. And even if it's used at the same time, it's not a big mistake. So I decided not to test it. > > Right, I'll adjust this patch again. > >> >>> 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$', ... >>> >>> Signed-off-by: Zhen Lei >>> --- >>> Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> index 384191ee497f534..a42992fa687d3f3 100644 >>> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml >>> @@ -115,6 +115,11 @@ properties: >>> $ref: audio-graph-port.yaml# >>> unevaluatedProperties: false >>> >>> + ports: >> >> $ref: /schemas/graph.yaml#/properties/ports > > OK, thanks > >> >>> + patternProperties: >>> + '^port@[0-9]': >>> + $ref: "#/properties/port" >> >> Then this should be: $ref: audio-graph-port.yaml# > > OK, thanks > >> >> Also, what each port is should be defined, but that's a separate >> problem. >> >>> + >>> # use patternProperties to avoid naming "xxx,yyy" issue >>> patternProperties: >>> "^rcar_sound,dvc$": >>> -- >>> 1.8.3 >>> >>> >> >> . >>