From patchwork Thu Oct 15 04:44:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 294308 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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 9692CC43457 for ; Thu, 15 Oct 2020 04:46:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BA0522257 for ; Thu, 15 Oct 2020 04:46:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729045AbgJOEqe (ORCPT ); Thu, 15 Oct 2020 00:46:34 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15215 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726535AbgJOEqe (ORCPT ); Thu, 15 Oct 2020 00:46:34 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id DCD3BC3150ACB8255FE8; Thu, 15 Oct 2020 12:46:28 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.134) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Thu, 15 Oct 2020 12:46:20 +0800 From: Zhen Lei To: 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 CC: Zhen Lei Subject: [PATCH v2 1/1] dt-bindings: misc: add support for both property names cmd-gpios and cmd-gpio Date: Thu, 15 Oct 2020 12:44:43 +0800 Message-ID: <20201015044443.1828-2-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 In-Reply-To: <20201015044443.1828-1-thunder.leizhen@huawei.com> References: <20201015044443.1828-1-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.174.177.134] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org 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 - spi-cpha: true - required: - compatible - - cmd-gpios + +oneOf: + - required: + - cmd-gpio + - required: + - cmd-gpios additionalProperties: false