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=-12.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 467A6C43467 for ; Thu, 15 Oct 2020 07:59:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E564322249 for ; Thu, 15 Oct 2020 07:59:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730018AbgJOH7h (ORCPT ); Thu, 15 Oct 2020 03:59:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15217 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729992AbgJOH7h (ORCPT ); Thu, 15 Oct 2020 03:59:37 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0D7AB1CCEAD4900AD1C6; Thu, 15 Oct 2020 15:59:32 +0800 (CST) Received: from [127.0.0.1] (10.174.177.134) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.487.0; Thu, 15 Oct 2020 15:59:30 +0800 Subject: Re: [PATCH v2 1/1] dt-bindings: misc: add support for both property names cmd-gpios and cmd-gpio To: Geert Uytterhoeven CC: Rob Herring , Pavel Machek , Dan Murphy , linux-leds , Lee Jones , Benson Leung , "Enric Balletbo i Serra" , Guenter Roeck , Mark Brown , linux-spi , Lubomir Rintel , devicetree , linux-arm-kernel , linux-kernel References: <20201015044443.1828-1-thunder.leizhen@huawei.com> <20201015044443.1828-2-thunder.leizhen@huawei.com> From: "Leizhen (ThunderTown)" Message-ID: <5df45c92-9a2c-82d4-491a-ec869f347665@huawei.com> Date: Thu, 15 Oct 2020 15:59:28 +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.177.134] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org On 2020/10/15 15:01, Geert Uytterhoeven wrote: > Hi Zhen, > > Thanks for your patch! > > On Thu, Oct 15, 2020 at 6:52 AM Zhen Lei wrote: >> The definition "gpio_suffixes[] = { "gpios", "gpio" }" shows that both >> property names "cmd-gpios" and "cmd-gpio" are supported. But currently >> only "cmd-gpios" is allowed in this yaml, and the name used in >> mmp2-olpc-xo-1-75.dts is cmd-gpio. As a result, the following errors is >> reported. >> >> slave: 'cmd-gpios' is a required property >> slave: 'cmd-gpio' does not match any of the regexes: 'pinctrl-[0-9]+' >> >> Signed-off-by: Zhen Lei >> --- >> Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml | 14 ++++++++++---- >> 1 file changed, 10 insertions(+), 4 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml >> index b3c45c046ba5e37..dd549380a085709 100644 >> --- a/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml >> +++ b/Documentation/devicetree/bindings/misc/olpc,xo1.75-ec.yaml >> @@ -24,15 +24,21 @@ properties: >> compatible: >> const: olpc,xo1.75-ec >> >> - cmd-gpios: >> + spi-cpha: true >> + >> +patternProperties: >> + "^cmd-gpio[s]?$": >> description: GPIO uspecifier of the CMD pin >> maxItems: 1 > > In general, the *-gpio form is deprecated. So why complicate the DT > bindings by adding support for deprecated properties? I just don't know this information. So this patch can be ignored. > > 1. Explicitly allowing deprecated properties means new users may be > added, > 2. Once all in-tree DTS files are converted, the warnings will be gone > anyway, > 3. Out-of-tree DTB will still work, as it's very unlikely support for > the "gpio" suffix can/will be dropped anytime soon, > 4. If anyone runs the validator on out-of-tree DTS files, the most > probable intention is to fix any detected issues anyway, and the > files can be updated, too, > 5. If any out-of-tree code or tooling relies on the *-gpio form, it > may already be broken. > >> - spi-cpha: true >> - >> required: >> - compatible >> - - cmd-gpios >> + >> +oneOf: >> + - required: >> + - cmd-gpio >> + - required: >> + - cmd-gpios >> >> additionalProperties: false > > Gr{oetje,eeting}s, > > Geert >