From patchwork Fri Mar 4 09:05:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianqun Xu X-Patchwork-Id: 548381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FA53C4332F for ; Fri, 4 Mar 2022 09:06:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236545AbiCDJHC (ORCPT ); Fri, 4 Mar 2022 04:07:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236726AbiCDJG3 (ORCPT ); Fri, 4 Mar 2022 04:06:29 -0500 Received: from mail-m17661.qiye.163.com (mail-m17661.qiye.163.com [59.111.176.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C80D2192E36 for ; Fri, 4 Mar 2022 01:05:28 -0800 (PST) Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m17661.qiye.163.com (Hmail) with ESMTPA id EB3B01DFE78; Fri, 4 Mar 2022 17:05:26 +0800 (CST) From: Jianqun Xu To: heiko@sntech.de Cc: linus.walleij@linaro.org, linux-rockchip@lists.infradead.org, linux-gpio@vger.kernel.org, Jianqun Xu Subject: [PATCH 3/3] dt-bindings: gpio: rockchip,gpio add optional 'gpio-ranges' Date: Fri, 4 Mar 2022 17:05:23 +0800 Message-Id: <20220304090523.1748297-4-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220304090523.1748297-1-jay.xu@rock-chips.com> References: <20220304090523.1748297-1-jay.xu@rock-chips.com> MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUlKS0tKN1dZLVlBSVdZDwkaFQgSH1lBWUNMSUhWSUJCTBlKTU wYS0kaVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PBg6TDo*UT5PSj9WLSEvLBdD EgkKC0xVSlVKTU9NSENPTElMSEtIVTMWGhIXVREaAlUDDjsJFBgQVhgTEgsIVRgUFkVZV1kSC1lB WU5DVUlJVUxVSkpPWVdZCAFZQUlKQ0I3Bg++ X-HM-Tid: 0a7f542d4426da2bkuwseb3b01dfe78 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add a optional property 'gpio-ranges', such as gpio-ranges = <&pinctrl 0 0 32>; When the gpio nodes are under pinctrl, the property 'gpio-ranges' is a optional property, but when they are under root node, the property 'gpio-ranges' is a required property. Signed-off-by: Jianqun Xu --- .../devicetree/bindings/gpio/rockchip,gpio-bank.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml index d4e42c2b995b..7a075fcea75f 100644 --- a/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml +++ b/Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml @@ -49,7 +49,12 @@ required: - interrupt-controller - "#interrupt-cells" -additionalProperties: false +additionalProperties: true + gpio-ranges: + maxItems: 1 + description: | + The property is a optional if gpio node under pinctrl node; + but it is a required property if the gpio is under root node. examples: - |